Modify bounds and transform for BSL input.
We don't want to send the BufferStateLayer's transform to input, but rather
the parent's transform. This is because the current layer's transform is
information about how the buffer is placed on screen. The parent's
transform makes more sense to send since this is information about how the
layer is placed on screen. This transform is used by input to determine
how to go from screen space back to window space.
Also update the bounds for BufferStateLayer that's used for input. We
need to include the transform here since input assumes the frame already
includes the buffer transform.
Test: EndToEndNativeInputTest
Test: Rotate and scroll content
Fixes: 184807094
Change-Id: I59c1f32a57dff4f007202b5998fff55f4e125438
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 4a105eb..f900968 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -1025,6 +1025,9 @@
compositionengine::OutputLayer* findOutputLayerForDisplay(const DisplayDevice*) const;
bool usingRelativeZ(LayerVector::StateSet) const;
+ virtual ui::Transform getInputTransform() const;
+ virtual Rect getInputBounds() const;
+
// SyncPoints which will be signaled when the correct frame is at the head
// of the queue and dropped after the frame has been latched. Protected by
// mLocalSyncPointMutex.