SF: Change rounding behavior in setGeometry
- Add an option for a transform to round outwards instead of to the
nearest pixel.
- Use this new rounding behavior when converting the crop rectangle
from display-space to layer-space. Otherwise a pixel that will
partially be on the screen might be marked as transparent.
Bug 30510632
Change-Id: I1aece177cc29c54ee0d4a2c919e47442eb455f30
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 2a3c229..2b89939 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -559,7 +559,7 @@
#endif
activeCrop.clear();
}
- activeCrop = s.active.transform.inverse().transform(activeCrop);
+ activeCrop = s.active.transform.inverse().transform(activeCrop, true);
// This needs to be here as transform.transform(Rect) computes the
// transformed rect and then takes the bounding box of the result before
// returning. This means