From 8785ceb3b94b78312cd24e22f05610d9b654221e Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 29 Oct 2018 16:45:58 -0700 Subject: Refactors and a potential public API for rendering Split out the View/ViewRootImpl bits from the hardware rendering bits. Create a potential public API surface for hardware rendering Bug: 112709971 Test: builds & boots Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56 --- core/java/android/view/ViewRootImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 dd1f6407682f..a23d68b17245 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -46,6 +46,8 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.FrameInfo; +import android.graphics.HardwareRenderer.FrameDrawingCallback; import android.graphics.Matrix; import android.graphics.PixelFormat; import android.graphics.Point; @@ -84,7 +86,6 @@ import android.util.TimeUtils; import android.util.TypedValue; import android.view.Surface.OutOfResourcesException; import android.view.SurfaceControl.Transaction; -import android.view.ThreadedRenderer.FrameDrawingCallback; import android.view.View.AttachInfo; import android.view.View.FocusDirection; import android.view.View.MeasureSpec; @@ -2148,7 +2149,7 @@ public final class ViewRootImpl implements ViewParent, // relayoutWindow may decide to destroy mSurface. As that decision // happens in WindowManager service, we need to be defensive here // and stop using the surface in case it gets destroyed. - if (mAttachInfo.mThreadedRenderer.pauseSurface(mSurface)) { + if (mAttachInfo.mThreadedRenderer.pause()) { // Animations were running so we need to push a frame // to resume them mDirty.set(0, 0, mWidth, mHeight); @@ -2266,7 +2267,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 - mAttachInfo.mThreadedRenderer.allocateBuffers(mSurface); + mAttachInfo.mThreadedRenderer.allocateBuffers(); } } catch (OutOfResourcesException e) { handleOutOfResourcesException(e); -- cgit v1.2.3