Title: [208873] trunk/Source/WebCore
Revision
208873
Author
achristen...@apple.com
Date
2016-11-17 18:41:35 -0800 (Thu, 17 Nov 2016)

Log Message

Fix WinCairo build after r208740
https://bugs.webkit.org/show_bug.cgi?id=164749

* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::validateAttributes):
(WebCore::GraphicsContext3D::getExtensions):
Use more references instead of pointers, like Myles did in r208740

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208872 => 208873)


--- trunk/Source/WebCore/ChangeLog	2016-11-18 02:11:05 UTC (rev 208872)
+++ trunk/Source/WebCore/ChangeLog	2016-11-18 02:41:35 UTC (rev 208873)
@@ -1,5 +1,16 @@
 2016-11-17  Alex Christensen  <achristen...@webkit.org>
 
+        Fix WinCairo build after r208740
+        https://bugs.webkit.org/show_bug.cgi?id=164749
+
+        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
+        (WebCore::GraphicsContext3D::reshapeFBOs):
+        (WebCore::GraphicsContext3D::validateAttributes):
+        (WebCore::GraphicsContext3D::getExtensions):
+        Use more references instead of pointers, like Myles did in r208740
+
+2016-11-17  Alex Christensen  <achristen...@webkit.org>
+
         Implement TextDecoder and TextEncoder
         https://bugs.webkit.org/show_bug.cgi?id=163771
 

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp (208872 => 208873)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp	2016-11-18 02:11:05 UTC (rev 208872)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp	2016-11-18 02:41:35 UTC (rev 208873)
@@ -116,19 +116,19 @@
         ::glBindTexture(GL_TEXTURE_2D, 0);
 #endif
 
-    Extensions3DOpenGLES* extensions = static_cast<Extensions3DOpenGLES*>(getExtensions());
-    if (extensions->isImagination() && m_attrs.antialias) {
+    Extensions3DOpenGLES& extensions = static_cast<Extensions3DOpenGLES&>(getExtensions());
+    if (extensions.isImagination() && m_attrs.antialias) {
         GLint maxSampleCount;
         ::glGetIntegerv(Extensions3D::MAX_SAMPLES_IMG, &maxSampleCount); 
         GLint sampleCount = std::min(8, maxSampleCount);
 
-        extensions->framebufferTexture2DMultisampleIMG(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0, sampleCount);
+        extensions.framebufferTexture2DMultisampleIMG(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0, sampleCount);
 
         if (m_attrs.stencil || m_attrs.depth) {
             // Use a 24 bit depth buffer where we know we have it.
             if (supportPackedDepthStencilBuffer) {
                 ::glBindRenderbuffer(GL_RENDERBUFFER, m_depthStencilBuffer);
-                extensions->renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH24_STENCIL8_OES, width, height);
+                extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH24_STENCIL8_OES, width, height);
                 if (m_attrs.stencil)
                     ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_depthStencilBuffer);
                 if (m_attrs.depth)
@@ -136,12 +136,12 @@
             } else {
                 if (m_attrs.stencil) {
                     ::glBindRenderbuffer(GL_RENDERBUFFER, m_stencilBuffer);
-                    extensions->renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_STENCIL_INDEX8, width, height);
+                    extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_STENCIL_INDEX8, width, height);
                     ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_stencilBuffer);
                 }
                 if (m_attrs.depth) {
                     ::glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer);
-                    extensions->renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH_COMPONENT16, width, height);
+                    extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH_COMPONENT16, width, height);
                     ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depthBuffer);
                 }
             }
@@ -222,11 +222,8 @@
 {
     validateDepthStencil("GL_OES_packed_depth_stencil");
 
-    if (m_attrs.antialias) {
-        Extensions3D* extensions = getExtensions();
-        if (!extensions->supports("GL_IMG_multisampled_render_to_texture"))
-            m_attrs.antialias = false;
-    }
+    if (m_attrs.antialias && !getExtensions().supports("GL_IMG_multisampled_render_to_texture"))
+        m_attrs.antialias = false;
 }
 
 void GraphicsContext3D::depthRange(GC3Dclampf zNear, GC3Dclampf zFar)
@@ -241,11 +238,11 @@
     ::glClearDepthf(depth);
 }
 
-Extensions3D* GraphicsContext3D::getExtensions()
+Extensions3D& GraphicsContext3D::getExtensions()
 {
     if (!m_extensions)
         m_extensions = std::make_unique<Extensions3DOpenGLES>(this, isGLES2Compliant());
-    return m_extensions.get();
+    return *m_extensions;
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to