summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-04-07 16:59:25 -0700
committerJohn Reck <jreck@google.com>2014-04-07 16:59:25 -0700
commit28ad7b52e038ef0cdd89f753d9839444a434b299 (patch)
tree918c519f621185485245118eb62599113f80445d /libs
parentce16215d7b4d9bedfc62e172dc44ab439afef13a (diff)
downloadframeworks_base-28ad7b52e038ef0cdd89f753d9839444a434b299.zip
frameworks_base-28ad7b52e038ef0cdd89f753d9839444a434b299.tar.gz
frameworks_base-28ad7b52e038ef0cdd89f753d9839444a434b299.tar.bz2
Fence on draws that are reported
Change-Id: Ib2ec16cbda40f40df1710bdc868869ea8301f17e
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp10
-rw-r--r--libs/hwui/renderthread/RenderProxy.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index cd711b0..0b6be19 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -252,6 +252,16 @@ void RenderProxy::destroyLayer(DeferredLayerUpdater* layer) {
post(task);
}
+CREATE_BRIDGE0(fence) {
+ // Intentionally empty
+ return NULL;
+}
+
+void RenderProxy::fence() {
+ SETUP_TASK(fence);
+ postAndWait(task);
+}
+
MethodInvokeRenderTask* RenderProxy::createTask(RunnableMethod method) {
// TODO: Consider having a small pool of these to avoid alloc churn
return new MethodInvokeRenderTask(method);
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index f1ca534..fc51d21 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -78,6 +78,8 @@ public:
ANDROID_API bool copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap);
ANDROID_API void destroyLayer(DeferredLayerUpdater* layer);
+ ANDROID_API void fence();
+
private:
RenderThread& mRenderThread;
CanvasContext* mContext;