Loading opengl/libagl/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ endif ifeq ($(LIBAGL_USE_GRALLOC_COPYBITS),1) LOCAL_CFLAGS += -DLIBAGL_USE_GRALLOC_COPYBITS LOCAL_SRC_FILES += copybit.cpp LOCAL_C_INCLUDES += hardware/libhardware/modules/gralloc endif LOCAL_CFLAGS += -DLOG_TAG=\"libagl\" Loading opengl/libagl/copybit.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,9 @@ static bool copybit(GLint x, GLint y, clipRectRegion it(c); status_t err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); if (err != NO_ERROR) { c->textures.tmu[0].texture->try_copybit = false; } return err == NO_ERROR ? true : false; } Loading opengl/libagl/egl.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -48,10 +48,6 @@ #include "texture.h" #include "matrix.h" #ifdef LIBAGL_USE_GRALLOC_COPYBITS #include "gralloc_priv.h" #endif // LIBAGL_USE_GRALLOC_COPYBITS #undef NELEM #define NELEM(x) (sizeof(x)/sizeof(*(x))) Loading Loading @@ -622,11 +618,10 @@ EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl) #ifdef LIBAGL_USE_GRALLOC_COPYBITS gl->copybits.drawSurfaceBuffer = 0; if (gl->copybits.blitEngine != NULL) { if (supportedCopybitsDestinationFormat(buffer.format)) { buffer_handle_t handle = this->buffer->handle; if (handle != NULL) { private_handle_t* hand = private_handle_t::dynamicCast(handle); if (hand != NULL && hand->usesPhysicallyContiguousMemory()) { gl->copybits.drawSurfaceBuffer = handle; } } Loading opengl/libagl/texture.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ #ifdef LIBAGL_USE_GRALLOC_COPYBITS #include "copybit.h" #include "gralloc_priv.h" #endif // LIBAGL_USE_GRALLOC_COPYBITS namespace android { Loading Loading @@ -1540,20 +1539,9 @@ void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) sp<EGLTextureObject> tex = getAndBindActiveTextureObject(c); tex->setImage(native_buffer); /* * Here an implementation can retrieve the buffer_handle_t of this buffer * which gives it access to an arbitrary-defined kernel resource * (or anything else for that matter). * There needs to be an intimate knowledge between GLES and buffer_handle_t, * so make sure to validate the handle before using it. * Typically, buffer_handle_t comes from the gralloc HAL which is provided * by the implementor of GLES. * */ #ifdef LIBAGL_USE_GRALLOC_COPYBITS tex->try_copybit = false; private_handle_t* hnd = private_handle_t::dynamicCast(native_buffer->handle); if (hnd && hnd->usesPhysicallyContiguousMemory()) { if (c->copybits.blitEngine != NULL) { tex->try_copybit = true; } #endif // LIBAGL_USE_GRALLOC_COPYBITS Loading Loading
opengl/libagl/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ endif ifeq ($(LIBAGL_USE_GRALLOC_COPYBITS),1) LOCAL_CFLAGS += -DLIBAGL_USE_GRALLOC_COPYBITS LOCAL_SRC_FILES += copybit.cpp LOCAL_C_INCLUDES += hardware/libhardware/modules/gralloc endif LOCAL_CFLAGS += -DLOG_TAG=\"libagl\" Loading
opengl/libagl/copybit.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,9 @@ static bool copybit(GLint x, GLint y, clipRectRegion it(c); status_t err = copybit->stretch(copybit, &dst, &src, &drect, &srect, &it); if (err != NO_ERROR) { c->textures.tmu[0].texture->try_copybit = false; } return err == NO_ERROR ? true : false; } Loading
opengl/libagl/egl.cpp +4 −9 Original line number Diff line number Diff line Loading @@ -48,10 +48,6 @@ #include "texture.h" #include "matrix.h" #ifdef LIBAGL_USE_GRALLOC_COPYBITS #include "gralloc_priv.h" #endif // LIBAGL_USE_GRALLOC_COPYBITS #undef NELEM #define NELEM(x) (sizeof(x)/sizeof(*(x))) Loading Loading @@ -622,11 +618,10 @@ EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl) #ifdef LIBAGL_USE_GRALLOC_COPYBITS gl->copybits.drawSurfaceBuffer = 0; if (gl->copybits.blitEngine != NULL) { if (supportedCopybitsDestinationFormat(buffer.format)) { buffer_handle_t handle = this->buffer->handle; if (handle != NULL) { private_handle_t* hand = private_handle_t::dynamicCast(handle); if (hand != NULL && hand->usesPhysicallyContiguousMemory()) { gl->copybits.drawSurfaceBuffer = handle; } } Loading
opengl/libagl/texture.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ #ifdef LIBAGL_USE_GRALLOC_COPYBITS #include "copybit.h" #include "gralloc_priv.h" #endif // LIBAGL_USE_GRALLOC_COPYBITS namespace android { Loading Loading @@ -1540,20 +1539,9 @@ void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) sp<EGLTextureObject> tex = getAndBindActiveTextureObject(c); tex->setImage(native_buffer); /* * Here an implementation can retrieve the buffer_handle_t of this buffer * which gives it access to an arbitrary-defined kernel resource * (or anything else for that matter). * There needs to be an intimate knowledge between GLES and buffer_handle_t, * so make sure to validate the handle before using it. * Typically, buffer_handle_t comes from the gralloc HAL which is provided * by the implementor of GLES. * */ #ifdef LIBAGL_USE_GRALLOC_COPYBITS tex->try_copybit = false; private_handle_t* hnd = private_handle_t::dynamicCast(native_buffer->handle); if (hnd && hnd->usesPhysicallyContiguousMemory()) { if (c->copybits.blitEngine != NULL) { tex->try_copybit = true; } #endif // LIBAGL_USE_GRALLOC_COPYBITS Loading