From 8e0fedbdb183bd9022f64232bb2515517c88e240 Mon Sep 17 00:00:00 2001 From: Arthur Hung Date: Thu, 10 Jun 2021 22:57:18 +0800 Subject: Update transform hint from relayout window (1/2) The transform hint is used to prevent allocating a buffer of a different size when a window is rotated. We return the fixed rotation transform and pass it to BLASTBufferQueue so the producer can choose to consume the hint and allocate the buffer with the same size. Bug: 188893403 Bug: 177029197 Test: atest WmTests Test: gfxbenchmark Test: atest libsurfaceflinger_unittest SurfaceFlinger_test Change-Id: If631984cf6b4b74ccdf19547fd6a63e759ed5732 --- core/java/android/view/ViewRootImpl.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/java/android/view/ViewRootImpl.java') diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index d42e0c367763..25baea51ca28 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -10353,4 +10353,8 @@ public final class ViewRootImpl implements ViewParent, }); return true; } + + int getSurfaceTransformHint() { + return mSurfaceControl.getTransformHint(); + } } -- cgit v1.2.3