Don't optimize out rcUpdateColorBuffer
bug:28406160
If we want to use rcUpdateColorBuffer to
synchronize on the host in order to remove
out of order webcam frames, we need to call it
if (cb->hostHandle), not just when
the width and height are nonzero.
Otherwise, we get deadlocks.
Change-Id: Ib98774b935e8786e307dd38711a0f2f9ffea440e
(cherry picked from commit 6298285500362b217b73b96def2ce207e206171d)
diff --git a/opengl/system/gralloc/gralloc.cpp b/opengl/system/gralloc/gralloc.cpp
index f597d2b..f8f9292 100644
--- a/opengl/system/gralloc/gralloc.cpp
+++ b/opengl/system/gralloc/gralloc.cpp
@@ -732,7 +732,7 @@
// if buffer was locked for s/w write, we need to update the host with
// the updated data
//
- if (cb->lockedWidth > 0 && cb->lockedHeight > 0 && cb->hostHandle) {
+ if (cb->hostHandle) {
// Make sure we have host connection
DEFINE_AND_VALIDATE_HOST_CONNECTION;