fix a bug where copybit only renders in the first buffer when used with s/w GL
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index d675107..05fd46e 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1544,12 +1544,10 @@
*
*/
#ifdef LIBAGL_USE_GRALLOC_COPYBITS
- tex->copybits_fd = -1;
- private_handle_t* hand;
- if ((hand = private_handle_t::dynamicCast(native_buffer->handle)) != NULL) {
- if (hand->usesPhysicallyContiguousMemory()) {
- tex->copybits_fd = hand->fd;
- }
+ tex->try_copybit = false;
+ private_handle_t* hnd = private_handle_t::dynamicCast(native_buffer->handle);
+ if (hnd && hnd->usesPhysicallyContiguousMemory()) {
+ tex->try_copybit = true;
}
#endif // LIBAGL_USE_GRALLOC_COPYBITS
}