From cef9a28a345ea0b223d5b6cf8d23b99625c8d920 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 14 Jan 2020 09:08:05 -0800 Subject: Replace deferTransactionUntilSurface with deferTransactionUntil In the case of the BLASTBufferQueue adapter the IGBP assosciated with the Surface will not be known to SurfaceFlinger. This means passing it as a handle for deferring transacations will fail. This is a first step at making deferred transactions work with BLAST for migration purposes. Bug: 146598493 Test: Builds, existing tests pass. Change-Id: I2e1f9d7a7bc079c18d0e4f4fbde3541022b15f1f --- core/java/android/view/SurfaceView.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/java/android/view/SurfaceView.java') diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 17825444a524..df0f04403d89 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -407,7 +407,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } t.setAlpha(mSurfaceControl, alpha); if (!useBLAST) { - t.deferTransactionUntilSurface(mSurfaceControl, parent, frame); + t.deferTransactionUntil(mSurfaceControl, + viewRoot.getRenderSurfaceControl(), frame); } } // It's possible that mSurfaceControl is released in the UI thread before @@ -1110,7 +1111,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall if (frameNumber > 0 && !WindowManagerGlobal.USE_BLAST_ADAPTER) { final ViewRootImpl viewRoot = getViewRootImpl(); - t.deferTransactionUntilSurface(surface, viewRoot.mSurface, + t.deferTransactionUntil(surface, viewRoot.getRenderSurfaceControl(), frameNumber); } @@ -1205,8 +1206,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall if (frameNumber > 0 && viewRoot != null && !useBLAST) { if (viewRoot.mSurface.isValid()) { - mRtTransaction.deferTransactionUntilSurface(mSurfaceControl, viewRoot.mSurface, - frameNumber); + mRtTransaction.deferTransactionUntil(mSurfaceControl, + viewRoot.getRenderSurfaceControl(), frameNumber); } } t.hide(mSurfaceControl); -- cgit v1.2.3