Title: [270451] trunk/Source/WebCore
Revision
270451
Author
hironori.fu...@sony.com
Date
2020-12-04 12:38:37 -0800 (Fri, 04 Dec 2020)

Log Message

GraphicsContextGLOpenGL: m_depthBuffer and m_stencilBuffer are used only if USE(OPENGL_ES)
https://bugs.webkit.org/show_bug.cgi?id=219422

Reviewed by Don Olmstead.

* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
Conditioned out m_depthBuffer and m_stencilBuffer with #if !USE(ANGLE) && USE(OPENGL_ES).
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
Removed code to generate m_depthBuffer and m_stencilBuffer because
this code is only for USE(ANGLE).
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (270450 => 270451)


--- trunk/Source/WebCore/ChangeLog	2020-12-04 20:15:22 UTC (rev 270450)
+++ trunk/Source/WebCore/ChangeLog	2020-12-04 20:38:37 UTC (rev 270451)
@@ -1,3 +1,18 @@
+2020-12-04  Fujii Hironori  <hironori.fu...@sony.com>
+
+        GraphicsContextGLOpenGL: m_depthBuffer and m_stencilBuffer are used only if USE(OPENGL_ES)
+        https://bugs.webkit.org/show_bug.cgi?id=219422
+
+        Reviewed by Don Olmstead.
+
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+        Conditioned out m_depthBuffer and m_stencilBuffer with #if !USE(ANGLE) && USE(OPENGL_ES).
+        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
+        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
+        Removed code to generate m_depthBuffer and m_stencilBuffer because
+        this code is only for USE(ANGLE).
+        (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
+
 2020-12-04  David Kilzer  <ddkil...@apple.com>
 
         Add safety checks to xsltParamArrayFromParameterMap()

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (270450 => 270451)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-12-04 20:15:22 UTC (rev 270450)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2020-12-04 20:38:37 UTC (rev 270451)
@@ -644,8 +644,10 @@
     GCGLuint m_intermediateTexture { 0 };
 #endif
 
+#if !USE(ANGLE) && USE(OPENGL_ES)
     GCGLuint m_depthBuffer { 0 };
     GCGLuint m_stencilBuffer { 0 };
+#endif
     GCGLuint m_depthStencilBuffer { 0 };
 
     bool m_layerComposited { false };

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp (270450 => 270451)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2020-12-04 20:15:22 UTC (rev 270450)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2020-12-04 20:38:37 UTC (rev 270451)
@@ -190,12 +190,6 @@
             // Bind canvas FBO.
             gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
             m_state.boundDrawFBO = m_state.boundReadFBO = m_fbo;
-#if USE(OPENGL_ES)
-            if (attributes.depth)
-                gl::GenRenderbuffers(1, &m_depthBuffer);
-            if (attributes.stencil)
-                gl::GenRenderbuffers(1, &m_stencilBuffer);
-#endif
             if (attributes.stencil || attributes.depth)
                 gl::GenRenderbuffers(1, &m_depthStencilBuffer);
         }
@@ -352,7 +346,7 @@
             gl::DeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer);
         gl::DeleteFramebuffers(1, &m_multisampleFBO);
     } else if (attributes.stencil || attributes.depth) {
-#if USE(OPENGL_ES)
+#if !USE(ANGLE) && USE(OPENGL_ES)
         if (m_depthBuffer)
             glDeleteRenderbuffers(1, &m_depthBuffer);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to