summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLingfeng Yang <lfy@google.com>2016-05-25 08:31:06 -0700
committerLingfeng Yang <lfy@google.com>2016-05-27 16:05:11 +0000
commit03031766dd3978edbb4b6e6d39139d215036921c (patch)
treeb7b18b5a1f70b4121326e15b8815bf3ec7a07b42
parentca3b20ff0dd8fed5dae26409c255c68ce73723af (diff)
downloadandroid_device_generic_goldfish-03031766dd3978edbb4b6e6d39139d215036921c.tar.gz
android_device_generic_goldfish-03031766dd3978edbb4b6e6d39139d215036921c.tar.bz2
android_device_generic_goldfish-03031766dd3978edbb4b6e6d39139d215036921c.zip
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)
-rw-r--r--opengl/system/gralloc/gralloc.cpp2
1 files changed, 1 insertions, 1 deletions
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 @@ static int gralloc_unlock(gralloc_module_t const* module,
// 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;