summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/surfaceflinger/Layer.cpp5
-rw-r--r--services/surfaceflinger/Layer.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 1f4c1f4327..629bee832e 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2446,6 +2446,7 @@ InputWindowInfo Layer::fillInputInfo() {
ySurfaceInset = std::round(ySurfaceInset * yScale);
}
+ // Transform the layer bounds from layer coordinate space to display coordinate space.
Rect transformedLayerBounds = t.transform(layerBounds);
// clamp inset to layer bounds
@@ -2470,7 +2471,7 @@ InputWindowInfo Layer::fillInputInfo() {
transformedLayerBounds.bottom = tmp;
}
- // Input coordinate should match the layer bounds.
+ // Input coordinates should be in display coordinate space.
info.frameLeft = transformedLayerBounds.left;
info.frameTop = transformedLayerBounds.top;
info.frameRight = transformedLayerBounds.right;
@@ -2483,7 +2484,7 @@ InputWindowInfo Layer::fillInputInfo() {
// the final frame calculated.
// 1. Take the original transform set on the window and get the inverse transform. This is
// used to get the final bounds in display space (ignorning the transform). Apply the
- // inverse transform on the layerBounds to get the untransformed frame (in display space)
+ // inverse transform on the layerBounds to get the untransformed frame (in layer space)
// 2. Take the top and left of the untransformed frame to get the real position on screen.
// Apply the layer transform on top/left so it includes any scale or rotation. These will
// be the new translation values for the transform.
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 51e392aa30..4b7c611e26 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -1073,7 +1073,8 @@ private:
sp<Layer> getRootLayer();
// Cached properties computed from drawing state
- // Effective transform taking into account parent transforms and any parent scaling.
+ // Effective transform taking into account parent transforms and any parent scaling, which is
+ // a transform from the current layer coordinate space to display(screen) coordinate space.
ui::Transform mEffectiveTransform;
// Bounds of the layer before any transformation is applied and before it has been cropped