Fix flicker from multiwindow resize
Move content bounds into DrawFrameTask. This ensures
that changes in bounds are synchronized with changes in
rendering commands, avoiding potential underdraw.
Bug: 64200212
Test: Repro steps in bug. Drag up/down on resize handle, verify
no flicker.
Change-Id: I3109acf262e23c2a7d8904f1dcbfc8273aaed65b
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index aa6d2f3..4a5b2c7 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -162,8 +162,8 @@
void addRenderNode(RenderNode* node, bool placeFront);
void removeRenderNode(RenderNode* node);
- void setContentDrawBounds(int left, int top, int right, int bottom) {
- mContentDrawBounds.set(left, top, right, bottom);
+ void setContentDrawBounds(const Rect& bounds) {
+ mContentDrawBounds = bounds;
}
RenderState& getRenderState() {