diff options
| author | 2009-05-05 00:37:46 -0700 | |
|---|---|---|
| committer | 2009-05-05 00:37:46 -0700 | |
| commit | 430f2ed5c03312700131a70c858b98e1cc6bc161 (patch) | |
| tree | 9ca0a2fbaeab0b932002818f2a33bd0de2e80623 /opengl/libagl/texture.cpp | |
| parent | 6279619e4279daf77feff0c76e089b26ad66124f (diff) | |
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.
Diffstat (limited to 'opengl/libagl/texture.cpp')
| -rw-r--r-- | opengl/libagl/texture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp index f2d8da3ca259..9bcbfdd24401 100644 --- a/opengl/libagl/texture.cpp +++ b/opengl/libagl/texture.cpp @@ -141,12 +141,13 @@ void ogles_lock_textures(ogles_context_t* c) 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)); } } |