Remove crop for Windowless Window leash
The crop creates interference with syncing an embedded window because
the crop doesn't happen in sync. Since the crop is really not needed,
it's simpler to just remove it.
Additionally, GL Surfaces were not setting scaling mode to
NATIVE_WINDOW_SCALING_MODE_FREEZE which prevents the sync from working
properly since the content would scale to the new size before a buffer
was sent. Since HWUI expects NATIVE_WINDOW_SCALING_MODE_FREEZE, this CL
also changes the scaling mode in CanvasContext for the surface used by
HWUI.
Added SurfaceSyncGroupContinuousTest presubmit test
Test: SurfaceSyncGroupContinuousTest
Bug: 237804605
Change-Id: I84c60c2a6fd6a88a1927138a0a93fbd0c16dfb6d
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index b769f8d..c8dcf09 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -248,6 +248,8 @@
// Order is important when new and old surfaces are the same, because old surface has
// its frame stats disabled automatically.
native_window_enable_frame_timestamps(mNativeSurface->getNativeWindow(), true);
+ native_window_set_scaling_mode(mNativeSurface->getNativeWindow(),
+ NATIVE_WINDOW_SCALING_MODE_FREEZE);
} else {
mRenderThread.removeFrameCallback(this);
mGenerationID++;