WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch
context3dchanges.patch (text/plain), 6.17 KB, created by
Kalyan
on 2012-12-28 00:04:04 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Kalyan
Created:
2012-12-28 00:04:04 PST
Size:
6.17 KB
patch
obsolete
>diff --git Source/WebCore/ChangeLog Source/WebCore/ChangeLog >index d5a2aab..1e3771f 100644 >--- Source/WebCore/ChangeLog >+++ Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2012-12-27 Kondapally Kalyan <kalyan.kondapally@intel.com> >+ >+ [EFL][WebGL] Add GLES2 support in GraphicsContext3DEfl. >+ https://bugs.webkit.org/show_bug.cgi?id=105805 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is in preparation for adding GLES2 support. >+ This patch adds OPENGL_ES_2 checks in GraphicsContext3DEFl. >+ With this patch, GraphicsContext3DPrivate uses the FramebufferBlit extension supported by Extensions3D. >+ >+ * platform/graphics/GraphicsContext3D.h: >+ (GraphicsContext3D): >+ * platform/graphics/efl/GraphicsContext3DEfl.cpp: >+ (WebCore::GraphicsContext3D::GraphicsContext3D): >+ * platform/graphics/efl/GraphicsContext3DPrivate.cpp: >+ (GraphicsContext3DPrivate::copyToGraphicsSurface): >+ * platform/graphics/opengl/GLDefs.h: >+ > 2012-12-27 Dimitri Glazkov <dglazkov@chromium.org> > > Fix styling/formatting errors, pointed out by Darin Adler while reviewing >diff --git Source/WebCore/platform/graphics/GraphicsContext3D.h Source/WebCore/platform/graphics/GraphicsContext3D.h >index 8c326f6..911f81c 100644 >--- Source/WebCore/platform/graphics/GraphicsContext3D.h >+++ Source/WebCore/platform/graphics/GraphicsContext3D.h >@@ -1048,7 +1048,7 @@ private: > ANGLEWebKitBridge m_compiler; > #endif > >-#if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || (PLATFORM(GTK) && USE(OPENGL_ES_2)) >+#if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || ((PLATFORM(GTK) || PLATFORM(EFL)) && USE(OPENGL_ES_2)) > friend class Extensions3DOpenGLES; > OwnPtr<Extensions3DOpenGLES> m_extensions; > #elif !PLATFORM(CHROMIUM) >diff --git Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp >index e4163bb..a3d7b16 100644 >--- Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp >+++ Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp >@@ -23,19 +23,13 @@ > > #if USE(3D_GRAPHICS) || USE(ACCELERATED_COMPOSITING) > >+#include "GLDefs.h" > #include "GraphicsContext3DPrivate.h" > #include "Image.h" > #include "ImageSource.h" > #include "NotImplemented.h" >-#include "OpenGLShims.h" > #include "PlatformContextCairo.h" > >-#if USE(OPENGL_ES_2) >-#include "Extensions3DOpenGLES.h" >-#else >-#include "Extensions3DOpenGL.h" >-#endif >- > namespace WebCore { > > PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, RenderStyle renderStyle) >@@ -106,7 +100,7 @@ GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs, HostWi > #if USE(OPENGL_ES_2) > if (m_attrs.depth) > glGenRenderbuffers(1, &m_depthBuffer); >- if (m_context->m_attrs.stencil) >+ if (m_attrs.stencil) > glGenRenderbuffers(1, &m_stencilBuffer); > #endif > if (m_attrs.stencil || m_attrs.depth) >diff --git Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp >index c807966..9030041 100644 >--- Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp >+++ Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp >@@ -141,31 +141,29 @@ uint32_t GraphicsContext3DPrivate::copyToGraphicsSurface() > m_platformSurface->setGeometry(IntRect(0, 0, m_context->m_currentWidth, m_context->m_currentHeight)); > } > >- bool enableScissorTest = false; >- int width = m_context->m_currentWidth; >- int height = m_context->m_currentHeight; >- >- // We should copy the full buffer, and not respect the current scissor bounds. >- // FIXME: It would be more efficient to track the state of the scissor test. >- if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { >- enableScissorTest = true; >- m_context->disable(GraphicsContext3D::SCISSOR_TEST); >- } >- > if (m_context->m_attrs.antialias) { >+ bool enableScissorTest = false; >+ int width = m_context->m_currentWidth; >+ int height = m_context->m_currentHeight; >+ // We should copy the full buffer, and not respect the current scissor bounds. >+ // FIXME: It would be more efficient to track the state of the scissor test. >+ if (m_context->isEnabled(GraphicsContext3D::SCISSOR_TEST)) { >+ enableScissorTest = true; >+ m_context->disable(GraphicsContext3D::SCISSOR_TEST); >+ } > >- glBindFramebuffer(GL_READ_FRAMEBUFFER_EXT, m_context->m_multisampleFBO); >- glBindFramebuffer(GL_DRAW_FRAMEBUFFER_EXT, m_context->m_fbo); >+ glBindFramebuffer(Extensions3D::READ_FRAMEBUFFER, m_context->m_multisampleFBO); >+ glBindFramebuffer(Extensions3D::DRAW_FRAMEBUFFER, m_context->m_fbo); > > // Use NEAREST as no scale is performed during the blit. >- glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); >+ m_context->getExtensions()->blitFramebuffer(0, 0, width, height, 0, 0, width, height, GraphicsContext3D::COLOR_BUFFER_BIT, GraphicsContext3D::NEAREST); >+ >+ if (enableScissorTest) >+ m_context->enable(GraphicsContext3D::SCISSOR_TEST); > } > > m_platformSurface->updateContents(m_context->m_texture, m_context->m_boundFBO, m_context->m_boundTexture0); > >- if (enableScissorTest) >- m_context->enable(GraphicsContext3D::SCISSOR_TEST); >- > return 0; > } > >diff --git Source/WebCore/platform/graphics/opengl/GLDefs.h Source/WebCore/platform/graphics/opengl/GLDefs.h >index f823dc4..56eab5e 100644 >--- Source/WebCore/platform/graphics/opengl/GLDefs.h >+++ Source/WebCore/platform/graphics/opengl/GLDefs.h >@@ -28,19 +28,22 @@ > > #if USE(ACCELERATED_COMPOSITING) > >+#define GL_GLEXT_PROTOTYPES 1 >+ > #if USE(OPENGL_ES_2) >+#include "Extensions3DOpenGLES.h" > #include "OpenGLESShims.h" > #include <GLES2/gl2.h> > #include <GLES2/gl2ext.h> > #else >+#include "Extensions3DOpenGL.h" > #include "OpenGLShims.h" > #include <GL/gl.h> > #include <GL/glext.h> >-#endif >- > #if USE(GLX) > #include <GL/glx.h> > #endif >+#endif > > #if USE(EGL) > #define EGL_EGLEXT_PROTOTYPES 1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105805
:
180838
|
180840
| 180848