diff options
author | Jesse Hall <jessehall@google.com> | 2014-05-23 16:39:09 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2014-05-27 16:55:32 -0700 |
commit | 40e0b05e6dbceced8b666108d100e5a28e81b7dd (patch) | |
tree | ea734a41c68024924002c1a9e0df728dadea498d /emulator/opengl/host/libs/renderControl_dec | |
parent | 93aa02793ea1594d788a3ec67139db183dc307b4 (diff) | |
download | sdk-40e0b05e6dbceced8b666108d100e5a28e81b7dd.zip sdk-40e0b05e6dbceced8b666108d100e5a28e81b7dd.tar.gz sdk-40e0b05e6dbceced8b666108d100e5a28e81b7dd.tar.bz2 |
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 'emulator/opengl/host/libs/renderControl_dec')
-rw-r--r-- | emulator/opengl/host/libs/renderControl_dec/renderControl.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/emulator/opengl/host/libs/renderControl_dec/renderControl.in b/emulator/opengl/host/libs/renderControl_dec/renderControl.in index 8281fd9..55539f9 100644 --- a/emulator/opengl/host/libs/renderControl_dec/renderControl.in +++ b/emulator/opengl/host/libs/renderControl_dec/renderControl.in @@ -23,3 +23,4 @@ GL_ENTRY(void, rcBindRenderbuffer, uint32_t colorBuffer) GL_ENTRY(EGLint, rcColorBufferCacheFlush, uint32_t colorbuffer, EGLint postCount,int forRead) GL_ENTRY(void, rcReadColorBuffer, uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void *pixels) GL_ENTRY(int, rcUpdateColorBuffer, uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void *pixels) +GL_ENTRY(int, rcOpenColorBuffer2, uint32_t colorbuffer) |