summaryrefslogtreecommitdiffstats
path: root/opengl/libagl/egl.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-10 16:01:54 -0700
committerMathias Agopian <mathias@google.com>2009-06-10 16:15:32 -0700
commit0a3139a21e628093893bba8ca0bb0b4742e0522c (patch)
tree969d7475aae42250b1b72ff31aa69a41def8482d /opengl/libagl/egl.cpp
parent7e2a937c4fa91e7c048fdbc37fe2a8dd85361df9 (diff)
downloadframeworks_native-0a3139a21e628093893bba8ca0bb0b4742e0522c.zip
frameworks_native-0a3139a21e628093893bba8ca0bb0b4742e0522c.tar.gz
frameworks_native-0a3139a21e628093893bba8ca0bb0b4742e0522c.tar.bz2
fix a bug where copybit only renders in the first buffer when used with s/w GL
Diffstat (limited to 'opengl/libagl/egl.cpp')
-rw-r--r--opengl/libagl/egl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 0df2bba..c6d5057 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -551,20 +551,20 @@ EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl)
gl->rasterizer.procs.colorBuffer(gl, &buffer);
if (depth.data != gl->rasterizer.state.buffers.depth.data)
gl->rasterizer.procs.depthBuffer(gl, &depth);
+
#ifdef LIBAGL_USE_GRALLOC_COPYBITS
- gl->copybits.drawSurfaceFd = -1;
+ gl->copybits.drawSurfaceBuffer = 0;
if (supportedCopybitsDestinationFormat(buffer.format)) {
buffer_handle_t handle = this->buffer->handle;
if (handle != NULL) {
private_handle_t* hand = private_handle_t::dynamicCast(handle);
- if (hand != NULL) {
- if (hand->usesPhysicallyContiguousMemory()) {
- gl->copybits.drawSurfaceFd = hand->fd;
- }
+ if (hand != NULL && hand->usesPhysicallyContiguousMemory()) {
+ gl->copybits.drawSurfaceBuffer = handle;
}
}
}
#endif // LIBAGL_USE_GRALLOC_COPYBITS
+
return EGL_TRUE;
}
EGLBoolean egl_window_surface_v2_t::bindReadSurface(ogles_context_t* gl)