Changeset 138526 in webkit
- Timestamp:
- Dec 28, 2012, 1:06:50 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r138519 r138526 1 2012-12-28 Kondapally Kalyan <kalyan.kondapally@intel.com> 2 3 [EFL][WebGL] Add GLES2 support in GraphicsContext3DEfl. 4 https://bugs.webkit.org/show_bug.cgi?id=105805 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 This is in preparation for adding GLES2 support. 9 This patch adds OPENGL_ES_2 checks in GraphicsContext3DEFl. 10 With this patch, GraphicsContext3DPrivate uses the FramebufferBlit extension supported by Extensions3D. 11 12 * platform/graphics/GraphicsContext3D.h: 13 (GraphicsContext3D): 14 * platform/graphics/efl/GraphicsContext3DEfl.cpp: 15 (WebCore::GraphicsContext3D::GraphicsContext3D): 16 * platform/graphics/efl/GraphicsContext3DPrivate.cpp: 17 (GraphicsContext3DPrivate::copyToGraphicsSurface): 18 * platform/graphics/opengl/GLDefs.h: 19 1 20 2012-12-27 Dimitri Glazkov <dglazkov@chromium.org> 2 21 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r137397 r138526 1049 1049 #endif 1050 1050 1051 #if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || ( PLATFORM(GTK) && USE(OPENGL_ES_2))1051 #if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || ((PLATFORM(GTK) || PLATFORM(EFL)) && USE(OPENGL_ES_2)) 1052 1052 friend class Extensions3DOpenGLES; 1053 1053 OwnPtr<Extensions3DOpenGLES> m_extensions; -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
r137467 r138526 24 24 #if USE(3D_GRAPHICS) || USE(ACCELERATED_COMPOSITING) 25 25 26 #include "GLDefs.h" 26 27 #include "GraphicsContext3DPrivate.h" 27 28 #include "Image.h" 28 29 #include "ImageSource.h" 29 30 #include "NotImplemented.h" 30 #include "OpenGLShims.h"31 31 #include "PlatformContextCairo.h" 32 33 #if USE(OPENGL_ES_2)34 #include "Extensions3DOpenGLES.h"35 #else36 #include "Extensions3DOpenGL.h"37 #endif38 32 39 33 namespace WebCore { … … 107 101 if (m_attrs.depth) 108 102 glGenRenderbuffers(1, &m_depthBuffer); 109 if (m_ context->m_attrs.stencil)103 if (m_attrs.stencil) 110 104 glGenRenderbuffers(1, &m_stencilBuffer); 111 105 #endif -
trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
r138346 r138526 142 142 } 143 143 144 bool enableScissorTest = false; 145 int width = m_context->m_currentWidth; 146 int height = m_context->m_currentHeight; 144 if (m_context->m_attrs.antialias) { 145 bool enableScissorTest = false; 146 int width = m_context->m_currentWidth; 147 int height = m_context->m_currentHeight; 148 // We should copy the full buffer, and not respect the current scissor bounds. 149 // FIXME: It would be more efficient to track the state of the scissor test. 150 if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { 151 enableScissorTest = true; 152 m_context->disable(GraphicsContext3D::SCISSOR_TEST); 153 } 147 154 148 // We should copy the full buffer, and not respect the current scissor bounds. 149 // FIXME: It would be more efficient to track the state of the scissor test. 150 if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { 151 enableScissorTest = true; 152 m_context->disable(GraphicsContext3D::SCISSOR_TEST); 153 } 154 155 if (m_context->m_attrs.antialias) { 156 157 glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_context->m_multisampleFBO); 158 glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_context->m_fbo); 155 glBindFramebuffer(Extensions3D::READ_FRAMEBUFFER, m_context->m_multisampleFBO); 156 glBindFramebuffer(Extensions3D::DRAW_FRAMEBUFFER, m_context->m_fbo); 159 157 160 158 // Use NEAREST as no scale is performed during the blit. 161 glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); 159 m_context->getExtensions()->blitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); 160 161 if (enableScissorTest) 162 m_context->enable(GraphicsContext3D::SCISSOR_TEST); 162 163 } 163 164 164 165 m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0); 165 166 if (enableScissorTest)167 m_context->enable(GraphicsContext3D::SCISSOR_TEST);168 166 169 167 return 0; -
trunk/Source/WebCore/platform/graphics/opengl/GLDefs.h
r138513 r138526 29 29 #if USE(ACCELERATED_COMPOSITING) 30 30 31 #define GL_GLEXT_PROTOTYPES 1 32 31 33 #if USE(OPENGL_ES_2) 34 #include "Extensions3DOpenGLES.h" 32 35 #include "OpenGLESShims.h" 33 36 #include <GLES2/gl2.h> 34 37 #include <GLES2/gl2ext.h> 35 38 #else 39 #include "Extensions3DOpenGL.h" 36 40 #include "OpenGLShims.h" 37 41 #include <GL/gl.h> 38 42 #include <GL/glext.h> 39 #endif40 41 43 #if USE(GLX) 42 44 #include <GL/glx.h> 45 #endif 43 46 #endif 44 47
Note:
See TracChangeset
for help on using the changeset viewer.