summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorBo Liu <boliu@google.com>2014-04-27 16:22:04 -0700
committerBo Liu <boliu@google.com>2014-04-28 13:41:18 -0700
commitae738a7a45d710115f8aedacf218d4bfa0b25698 (patch)
tree689f4b1393188e9f0b984de7c670ce2e0da65d7c /core/java/android/view
parent6d50c3ff8815e6fedd1f80ba7afb8f1d22ea45b7 (diff)
downloadframeworks_base-ae738a7a45d710115f8aedacf218d4bfa0b25698.zip
frameworks_base-ae738a7a45d710115f8aedacf218d4bfa0b25698.tar.gz
frameworks_base-ae738a7a45d710115f8aedacf218d4bfa0b25698.tar.bz2
Add invokeFunctor call to ViewRootImpl
BUG: 13961296 Change-Id: Ief8eea0b4c79a64ea76d75daaec176f1b8438581
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/GLRenderer.java2
-rw-r--r--core/java/android/view/HardwareRenderer.java2
-rw-r--r--core/java/android/view/ThreadedRenderer.java2
-rw-r--r--core/java/android/view/ViewRootImpl.java8
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;