diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/GLRenderer.java | 2 | ||||
| -rw-r--r-- | core/java/android/view/HardwareRenderer.java | 2 | ||||
| -rw-r--r-- | core/java/android/view/ThreadedRenderer.java | 2 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 8 |
4 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/view/GLRenderer.java b/core/java/android/view/GLRenderer.java index d8d11f7..97339cc 100644 --- a/core/java/android/view/GLRenderer.java +++ b/core/java/android/view/GLRenderer.java @@ -555,7 +555,7 @@ public class GLRenderer extends HardwareRenderer { } @Override - public void invokeFunctor(long functor, boolean waitForCompletion) { + void invokeFunctor(long functor, boolean waitForCompletion) { boolean needsContext = !isEnabled() || checkRenderContext() == SURFACE_STATE_ERROR; boolean hasContext = !needsContext; diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java index 56d96e1..d31c79d 100644 --- a/core/java/android/view/HardwareRenderer.java +++ b/core/java/android/view/HardwareRenderer.java @@ -453,7 +453,7 @@ public abstract class HardwareRenderer { * has invoked. If false, the functor may be invoked * asynchronously. */ - public abstract void invokeFunctor(long functor, boolean waitForCompletion); + abstract void invokeFunctor(long functor, boolean waitForCompletion); /** * Initializes the hardware renderer for the specified surface and setup the diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java index 924c331..c7a6d41 100644 --- a/core/java/android/view/ThreadedRenderer.java +++ b/core/java/android/view/ThreadedRenderer.java @@ -217,7 +217,7 @@ public class ThreadedRenderer extends HardwareRenderer { } @Override - public void invokeFunctor(long functor, boolean waitForCompletion) { + void invokeFunctor(long functor, boolean waitForCompletion) { nInvokeFunctor(mNativeProxy, functor, waitForCompletion); } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 246905d..5a48a9a 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -678,6 +678,14 @@ public final class ViewRootImpl implements ViewParent, } } + public boolean invokeFunctor(long functor, boolean waitForCompletion) { + if (mAttachInfo.mHardwareRenderer == null || !mAttachInfo.mHardwareRenderer.isEnabled()) { + return false; + } + mAttachInfo.mHardwareRenderer.invokeFunctor(functor, waitForCompletion); + return true; + } + private void enableHardwareAcceleration(WindowManager.LayoutParams attrs) { mAttachInfo.mHardwareAccelerated = false; mAttachInfo.mHardwareAccelerationRequested = false; |
