From 7823ee73ee504fcb5b0448b0b8f1b4804309df45 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Tue, 17 Jul 2018 15:24:16 +0200 Subject: Move allocateBuffers to RT Such that it gets executed after setSurface, in order that mReqUsage has the correct flags set. Test: Take trace, ensure that allocateBuffers actually allocates in the right format/usage by ensuring that dequeueBuffer doesn't trash them immediately again. Bug: 111517695 Change-Id: I94b402d7b29d565155a77a2d09106246261712d2 --- core/java/android/view/ViewRootImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 98a1ec38a1b4..6df0173d9684 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2103,7 +2103,7 @@ public final class ViewRootImpl implements ViewParent, & View.PFLAG_REQUEST_TRANSPARENT_REGIONS) == 0) { // Don't pre-allocate if transparent regions // are requested as they may not be needed - mSurface.allocateBuffers(); + mAttachInfo.mThreadedRenderer.allocateBuffers(mSurface); } } catch (OutOfResourcesException e) { handleOutOfResourcesException(e); -- cgit v1.2.3