Loading core/java/android/view/HardwareRenderer.java +0 −11 Original line number Diff line number Diff line Loading @@ -386,17 +386,6 @@ public abstract class HardwareRenderer { abstract boolean copyLayerInto(HardwareLayer layer, Bitmap bitmap); /** * Schedules the functor for execution in either kModeProcess or * kModeProcessNoContext, depending on whether or not there is an EGLContext. * * @param functor The native functor to invoke * @param waitForCompletion If true, this will not return until the functor * has invoked. If false, the functor may be invoked * asynchronously. */ abstract void invokeFunctor(long functor, boolean waitForCompletion); /** * Initializes the hardware renderer for the specified surface and setup the * renderer for drawing, if needed. This is invoked when the ViewAncestor has Loading core/java/android/view/ThreadedRenderer.java +8 −9 Original line number Diff line number Diff line Loading @@ -80,13 +80,13 @@ public class ThreadedRenderer extends HardwareRenderer { private boolean mProfilingEnabled; ThreadedRenderer(Context context, boolean translucent) { AtlasInitializer.sInstance.init(context); long rootNodePtr = nCreateRootRenderNode(); mRootNode = RenderNode.adopt(rootNodePtr); mRootNode.setClipToBounds(false); mNativeProxy = nCreateProxy(translucent, rootNodePtr); AtlasInitializer.sInstance.init(context, mNativeProxy); // Setup timing mChoreographer = Choreographer.getInstance(); nSetFrameInterval(mNativeProxy, mChoreographer.getFrameIntervalNanos()); Loading Loading @@ -259,9 +259,8 @@ public class ThreadedRenderer extends HardwareRenderer { } } @Override void invokeFunctor(long functor, boolean waitForCompletion) { nInvokeFunctor(mNativeProxy, functor, waitForCompletion); static void invokeFunctor(long functor, boolean waitForCompletion) { nInvokeFunctor(functor, waitForCompletion); } @Override Loading Loading @@ -342,7 +341,7 @@ public class ThreadedRenderer extends HardwareRenderer { private AtlasInitializer() {} synchronized void init(Context context) { synchronized void init(Context context, long renderProxy) { if (mInitialized) return; IBinder binder = ServiceManager.getService("assetatlas"); if (binder == null) return; Loading @@ -356,7 +355,7 @@ public class ThreadedRenderer extends HardwareRenderer { if (map != null) { // TODO Remove after fixing b/15425820 validateMap(context, map); nSetAtlas(buffer, map); nSetAtlas(renderProxy, buffer, map); mInitialized = true; } // If IAssetAtlas is not the same class as the IBinder Loading Loading @@ -399,7 +398,7 @@ public class ThreadedRenderer extends HardwareRenderer { static native void setupShadersDiskCache(String cacheFile); private static native void nSetAtlas(GraphicBuffer buffer, long[] map); private static native void nSetAtlas(long nativeProxy, GraphicBuffer buffer, long[] map); private static native long nCreateRootRenderNode(); private static native long nCreateProxy(boolean translucent, long rootRenderNode); Loading @@ -419,7 +418,7 @@ public class ThreadedRenderer extends HardwareRenderer { private static native void nRunWithGlContext(long nativeProxy, Runnable runnable); private static native void nDestroyCanvasAndSurface(long nativeProxy); private static native void nInvokeFunctor(long nativeProxy, long functor, boolean waitForCompletion); private static native void nInvokeFunctor(long functor, boolean waitForCompletion); private static native long nCreateDisplayListLayer(long nativeProxy, int width, int height); private static native long nCreateTextureLayer(long nativeProxy); Loading core/java/android/view/ViewRootImpl.java +12 −4 Original line number Diff line number Diff line Loading @@ -661,11 +661,19 @@ public final class ViewRootImpl implements ViewParent, } } /** * Schedules the functor for execution in either kModeProcess or * kModeProcessNoContext, depending on whether or not there is an EGLContext. * * @param functor The native functor to invoke * @param waitForCompletion If true, this will not return until the functor * has invoked. If false, the functor may be invoked * asynchronously. */ public boolean invokeFunctor(long functor, boolean waitForCompletion) { if (mAttachInfo.mHardwareRenderer == null) { return false; } mAttachInfo.mHardwareRenderer.invokeFunctor(functor, waitForCompletion); ThreadedRenderer.invokeFunctor(functor, waitForCompletion); // TODO: Remove the return value. This is here for compatibility // with current webview, which expects a boolean return true; } Loading Loading
core/java/android/view/HardwareRenderer.java +0 −11 Original line number Diff line number Diff line Loading @@ -386,17 +386,6 @@ public abstract class HardwareRenderer { abstract boolean copyLayerInto(HardwareLayer layer, Bitmap bitmap); /** * Schedules the functor for execution in either kModeProcess or * kModeProcessNoContext, depending on whether or not there is an EGLContext. * * @param functor The native functor to invoke * @param waitForCompletion If true, this will not return until the functor * has invoked. If false, the functor may be invoked * asynchronously. */ abstract void invokeFunctor(long functor, boolean waitForCompletion); /** * Initializes the hardware renderer for the specified surface and setup the * renderer for drawing, if needed. This is invoked when the ViewAncestor has Loading
core/java/android/view/ThreadedRenderer.java +8 −9 Original line number Diff line number Diff line Loading @@ -80,13 +80,13 @@ public class ThreadedRenderer extends HardwareRenderer { private boolean mProfilingEnabled; ThreadedRenderer(Context context, boolean translucent) { AtlasInitializer.sInstance.init(context); long rootNodePtr = nCreateRootRenderNode(); mRootNode = RenderNode.adopt(rootNodePtr); mRootNode.setClipToBounds(false); mNativeProxy = nCreateProxy(translucent, rootNodePtr); AtlasInitializer.sInstance.init(context, mNativeProxy); // Setup timing mChoreographer = Choreographer.getInstance(); nSetFrameInterval(mNativeProxy, mChoreographer.getFrameIntervalNanos()); Loading Loading @@ -259,9 +259,8 @@ public class ThreadedRenderer extends HardwareRenderer { } } @Override void invokeFunctor(long functor, boolean waitForCompletion) { nInvokeFunctor(mNativeProxy, functor, waitForCompletion); static void invokeFunctor(long functor, boolean waitForCompletion) { nInvokeFunctor(functor, waitForCompletion); } @Override Loading Loading @@ -342,7 +341,7 @@ public class ThreadedRenderer extends HardwareRenderer { private AtlasInitializer() {} synchronized void init(Context context) { synchronized void init(Context context, long renderProxy) { if (mInitialized) return; IBinder binder = ServiceManager.getService("assetatlas"); if (binder == null) return; Loading @@ -356,7 +355,7 @@ public class ThreadedRenderer extends HardwareRenderer { if (map != null) { // TODO Remove after fixing b/15425820 validateMap(context, map); nSetAtlas(buffer, map); nSetAtlas(renderProxy, buffer, map); mInitialized = true; } // If IAssetAtlas is not the same class as the IBinder Loading Loading @@ -399,7 +398,7 @@ public class ThreadedRenderer extends HardwareRenderer { static native void setupShadersDiskCache(String cacheFile); private static native void nSetAtlas(GraphicBuffer buffer, long[] map); private static native void nSetAtlas(long nativeProxy, GraphicBuffer buffer, long[] map); private static native long nCreateRootRenderNode(); private static native long nCreateProxy(boolean translucent, long rootRenderNode); Loading @@ -419,7 +418,7 @@ public class ThreadedRenderer extends HardwareRenderer { private static native void nRunWithGlContext(long nativeProxy, Runnable runnable); private static native void nDestroyCanvasAndSurface(long nativeProxy); private static native void nInvokeFunctor(long nativeProxy, long functor, boolean waitForCompletion); private static native void nInvokeFunctor(long functor, boolean waitForCompletion); private static native long nCreateDisplayListLayer(long nativeProxy, int width, int height); private static native long nCreateTextureLayer(long nativeProxy); Loading
core/java/android/view/ViewRootImpl.java +12 −4 Original line number Diff line number Diff line Loading @@ -661,11 +661,19 @@ public final class ViewRootImpl implements ViewParent, } } /** * Schedules the functor for execution in either kModeProcess or * kModeProcessNoContext, depending on whether or not there is an EGLContext. * * @param functor The native functor to invoke * @param waitForCompletion If true, this will not return until the functor * has invoked. If false, the functor may be invoked * asynchronously. */ public boolean invokeFunctor(long functor, boolean waitForCompletion) { if (mAttachInfo.mHardwareRenderer == null) { return false; } mAttachInfo.mHardwareRenderer.invokeFunctor(functor, waitForCompletion); ThreadedRenderer.invokeFunctor(functor, waitForCompletion); // TODO: Remove the return value. This is here for compatibility // with current webview, which expects a boolean return true; } Loading