Make updateSurface non-blocking
Bug: 30442298
We already do this for initialize(), fix
it so that update() is parallel with the
UI thread as well.
Shaves ~7ms off of the 99th percentile on
NotificationShade open & close
Change-Id: I1791df495453fb9e1e12362c68e3d20e837e62be
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index e129a06..2e0729b 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -520,16 +520,6 @@
}
/**
- * This method should be invoked whenever the current hardware renderer
- * context should be reset.
- *
- * @param surface The surface to hardware accelerate
- */
- void invalidate(Surface surface) {
- updateSurface(surface);
- }
-
- /**
* Detaches the layer's surface texture from the GL context and releases
* the texture id
*/
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index fb1c896..a734401 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -158,7 +158,7 @@
SETUP_TASK(updateSurface);
args->context = mContext;
args->surface = surface.get();
- postAndWait(task);
+ post(task);
}
CREATE_BRIDGE2(pauseSurface, CanvasContext* context, Surface* surface) {