summaryrefslogtreecommitdiff
path: root/opengl/libagl/egl.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2009-05-05 00:59:23 -0700
committer Mathias Agopian <mathias@google.com> 2009-05-05 00:59:23 -0700
commit21c59d0070fe24a8e04e52ce04d511a924a9932f (patch)
treefb3f5f8519fce57c714dce607b12dc44aba67702 /opengl/libagl/egl.cpp
parente71212ba5397387100a578d23b15862518a7a859 (diff)
get rid of android_native_buffer_t::getHandle() and replace it with an handle field
this abstraction was not necessary. things are easier now.
Diffstat (limited to 'opengl/libagl/egl.cpp')
-rw-r--r--opengl/libagl/egl.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 67dfd3eada..720ba0bdaf 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -274,26 +274,14 @@ void egl_window_surface_v2_t::disconnect()
status_t egl_window_surface_v2_t::lock(
android_native_buffer_t* buf, int usage, void** vaddr)
{
- int err;
- buffer_handle_t bufferHandle;
- err = buf->getHandle(buf, &bufferHandle);
- if (err < 0)
- return err;
-
- err = module->lock(module, bufferHandle,
+ int err = module->lock(module, buf->handle,
usage, 0, 0, buf->width, buf->height, vaddr);
return err;
}
status_t egl_window_surface_v2_t::unlock(android_native_buffer_t* buf)
{
- int err;
- buffer_handle_t bufferHandle;
- err = buf->getHandle(buf, &bufferHandle);
- if (err < 0)
- return err;
-
- err = module->unlock(module, bufferHandle);
+ int err = module->unlock(module, buf->handle);
return err;
}
@@ -379,8 +367,7 @@ EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl)
#ifdef LIBAGL_USE_GRALLOC_COPYBITS
gl->copybits.drawSurfaceFd = -1;
if (supportedCopybitsDestinationFormat(buffer.format)) {
- buffer_handle_t handle;
- this->buffer->getHandle(this->buffer, &handle);
+ buffer_handle_t handle = this->buffer->handle;
if (handle != NULL) {
private_handle_t* hand = private_handle_t::dynamicCast(handle);
if (hand != NULL) {