removed the "bits" attribute from android_native_buffer_t.
"bits" can never be trusted now that we need to call lock() on the handle to get the virtual address of the buffer.
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index f2d8da3..9bcbfdd 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -141,12 +141,13 @@
reinterpret_cast<gralloc_module_t const*>(pModule);
buffer_handle_t bufferHandle;
native_buffer->getHandle(native_buffer, &bufferHandle);
+ void* vaddr;
int err = module->lock(module, bufferHandle,
GRALLOC_USAGE_SW_READ_OFTEN,
0, 0, native_buffer->width, native_buffer->height,
- &native_buffer->bits);
+ &vaddr);
- u.texture->setImageBits(native_buffer->bits);
+ u.texture->setImageBits(vaddr);
c->rasterizer.procs.bindTexture(c, &(u.texture->surface));
}
}