From 33a6eee57aca65faa11536c3533bb77dea78b7bd Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Wed, 6 Feb 2019 13:48:06 -0800 Subject: SF: Update cursor position using drawing state Cursor position should be using drawing state instead of current state which may not be committed yet. The current implementation uses current state for bounds and calculates the layer's effective transform using the drawing state. Bug: 123989306 Test: Connect mouse and test pointer Change-Id: I400e1a90628e0a089e5c3bb33b5df91ae9208414 --- services/surfaceflinger/Layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/Layer.cpp') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 2de169dcb1..21591c3579 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -681,7 +681,7 @@ void Layer::updateCursorPosition(const sp& display) { } // This gives us only the "orientation" component of the transform - const State& s(getCurrentState()); + const State& s(getDrawingState()); // Apply the layer's transform, followed by the display's global transform // Here we're guaranteed that the layer's transform preserves rects -- cgit v1.2.3-59-g8ed1b