diff options
author | 2009-05-05 00:37:46 -0700 | |
---|---|---|
committer | 2009-05-05 00:37:46 -0700 | |
commit | e71212ba5397387100a578d23b15862518a7a859 (patch) | |
tree | 3bbcd9e77ec897c785781aacc35a5498fe2a0edc /opengl/libagl/texture.cpp | |
parent | b2dd686d06a608ee40285b93bc0217cf26c2b035 (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 f2d8da3ca2..9bcbfdd244 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)); } } |