diff options
author | Mathias Agopian <mathias@google.com> | 2009-05-04 14:17:04 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-05-04 14:17:04 -0700 |
commit | dff8e58d47ede6e748c0b02e128ca33b42a4f362 (patch) | |
tree | 716d70cda74aa625d6e67c4debc2eb7c6b81bfc9 /opengl/libagl/array.cpp | |
parent | fa6eda01a9f3df0102ce6a65302c8674cc9c7e50 (diff) |
update surfaceflinger, libui and libagl to the new gralloc api
- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually.
- factor all the lock/unlock code in SurfaceBuffer.
- fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers().
- improved the situation with the dirty-region and fixed a problem that caused GL apps to not update.
- make use of LightRefBase() where needed, instead of duplicating its implementation
- add LightRefBase::getStrongCount()
- renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp
- disabled copybits test, since it clashes with the new gralloc api
- Camera/Video will be fixed later when we rework the overlay apis
Diffstat (limited to 'opengl/libagl/array.cpp')
-rw-r--r-- | opengl/libagl/array.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp index eefe614c2fb7..6d2cc9111c84 100644 --- a/opengl/libagl/array.cpp +++ b/opengl/libagl/array.cpp @@ -1371,9 +1371,18 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) if ((c->cull.enable) && (c->cull.cullFace == GL_FRONT_AND_BACK)) return; // all triangles are culled + validate_arrays(c, mode); + + const uint32_t enables = c->rasterizer.state.enables; + if (enables & GGL_ENABLE_TMUS) + ogles_lock_textures(c); + drawArraysPrims[mode](c, first, count); + if (enables & GGL_ENABLE_TMUS) + ogles_unlock_textures(c); + #if VC_CACHE_STATISTICS c->vc.total = count; c->vc.dump_stats(mode); @@ -1425,8 +1434,16 @@ void glDrawElements( indices = c->arrays.element_array_buffer->data + uintptr_t(indices); } + const uint32_t enables = c->rasterizer.state.enables; + if (enables & GGL_ENABLE_TMUS) + ogles_lock_textures(c); + drawElementsPrims[mode](c, count, indices); + + if (enables & GGL_ENABLE_TMUS) + ogles_unlock_textures(c); + #if VC_CACHE_STATISTICS c->vc.total = count; c->vc.dump_stats(mode); |