Merge "Move allocateBuffers to RT" into pi-dev am: 2f8a3a4bb8

am: c9756c9193

Change-Id: Ieed40312fe16a54c3e1974621b53e29b23ddcdbc
This commit is contained in:
Jorim Jaggi
2018-07-18 15:19:39 -07:00
committed by android-build-merger
5 changed files with 20 additions and 1 deletions

View File

@@ -955,6 +955,10 @@ public final class ThreadedRenderer {
nSetDebuggingEnabled(enable);
}
void allocateBuffers(Surface surface) {
nAllocateBuffers(mNativeProxy, surface);
}
@Override
protected void finalize() throws Throwable {
try {
@@ -1243,4 +1247,5 @@ public final class ThreadedRenderer {
private static native void nSetDebuggingEnabled(boolean enabled);
private static native void nSetIsolatedProcess(boolean enabled);
private static native void nSetContextPriority(int priority);
private static native void nAllocateBuffers(long nativeProxy, Surface window);
}

View File

@@ -2101,7 +2101,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);