summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-02-21 09:47:06 -0800
committerJesse Hall <jessehall@google.com>2012-02-21 11:13:20 -0800
commitac018fe3f65e18083a2dd317f73e4139bfa5fee6 (patch)
treec768490e279e50dee0af90e5a76b3802b77284c4 /tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp
parent91d4e8e195592dbc812441597118452f887ea07d (diff)
EmuGL: refcount ColorBuffers on the host
The gralloc API assumes system-wide reference counting of gralloc buffers. The host-GL accelerated gralloc maps buffers to host-side ColorBuffer objects, but was destroying them unconditionally in gralloc_free(), ignoring any additional references from gralloc_register_buffer(). This affected the SurfaceTexture gralloc buffers used by the Browser/WebView. For some reason these buffers are actually allocated by SurfaceFlinger and passed back to the WebView through Binder. But since SurfaceFlinger doesn't actually need the buffer for anything, sometime after the WebView has called gralloc_register_buffer() SurfaceFlinger calls gralloc_free() on it. This caused the host ColorBuffer to be destroyed long before the WebView is done using it. Change-Id: I33dbee887a48a6907041cf19e9f38a1f6c983eff
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp')
0 files changed, 0 insertions, 0 deletions