summaryrefslogtreecommitdiffstats
path: root/opengl/system/renderControl_enc/renderControl_ftable.h
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2014-05-27 09:25:24 -0700
committerJesse Hall <jessehall@google.com>2014-05-27 11:34:26 -0700
commitc542f3d8fc89678574b2fa650395f3dfac991a20 (patch)
tree8de7e3f63d31097b23f2a6f08b43419abedc2bb3 /opengl/system/renderControl_enc/renderControl_ftable.h
parent2c6c08a23d2f5f760753745be5b67fe5759dcc91 (diff)
downloadandroid_device_generic_goldfish-c542f3d8fc89678574b2fa650395f3dfac991a20.tar.gz
android_device_generic_goldfish-c542f3d8fc89678574b2fa650395f3dfac991a20.tar.bz2
android_device_generic_goldfish-c542f3d8fc89678574b2fa650395f3dfac991a20.zip
opengl: rcOpenColorBuffer must be synchronous
The gralloc register_buffer() function, which calls rcOpenColorBuffer, must actually increment the reference count before returning. Otherwise the buffer allocator may release its reference before the client has obtained one, and the buffer will be freed prematurely. Since rcOpenColorBuffer was just sending a message to the host without waiting for it to be received/processed, this guarantee was not met. Adding a return value makes the call synchronous. Bug: 12988668 Change-Id: I8b2399cfb0f600f99b3387f630343291b59bc9a6
Diffstat (limited to 'opengl/system/renderControl_enc/renderControl_ftable.h')
-rw-r--r--opengl/system/renderControl_enc/renderControl_ftable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/opengl/system/renderControl_enc/renderControl_ftable.h b/opengl/system/renderControl_enc/renderControl_ftable.h
index 1e9e2f9..a43fe5b 100644
--- a/opengl/system/renderControl_enc/renderControl_ftable.h
+++ b/opengl/system/renderControl_enc/renderControl_ftable.h
@@ -33,6 +33,7 @@ static struct _renderControl_funcs_by_name {
{"rcColorBufferCacheFlush", (void*)rcColorBufferCacheFlush},
{"rcReadColorBuffer", (void*)rcReadColorBuffer},
{"rcUpdateColorBuffer", (void*)rcUpdateColorBuffer},
+ {"rcOpenColorBuffer2", (void*)rcOpenColorBuffer2},
};
static int renderControl_num_funcs = sizeof(renderControl_funcs_by_name) / sizeof(struct _renderControl_funcs_by_name);