Title: [228205] branches/safari-605-branch/Source/WebCore

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228204 => 228205)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-07 00:53:36 UTC (rev 228204)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-07 00:53:39 UTC (rev 228205)
@@ -1,5 +1,29 @@
 2018-02-06  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r228191. rdar://problem/37292910
+
+    2018-02-06  Dean Jackson  <d...@apple.com>
+
+            REGRESSION: WebGL no longer producing a transparent canvas on iOS
+            https://bugs.webkit.org/show_bug.cgi?id=182550
+            <rdar://problem/37234491>
+
+            Reviewed by Eric Carlson.
+
+            Due to some weirdness GL_RGBA8 is sometimes different between iOS and
+            other platforms. Only tell the WebGLLayer that it is opaque when it really
+            is not transparent.
+
+            Covered by existing test: fast/canvas/webgl/context-attributes-alpha
+
+            * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
+            (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Look at the context
+            attributes to decide if we should use an opaque layer.
+            * platform/graphics/cocoa/WebGLLayer.mm: Ditto.
+            (-[WebGLLayer initWithGraphicsContext3D:]):
+
+2018-02-06  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r228189. rdar://problem/37292905
 
     2018-02-06  Andy Estes  <aes...@apple.com>

Modified: branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (228204 => 228205)


--- branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm	2018-02-07 00:53:36 UTC (rev 228204)
+++ branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm	2018-02-07 00:53:39 UTC (rev 228205)
@@ -602,7 +602,7 @@
     CGRect previousBounds = [m_webGLLayer.get() bounds];
 
     [m_webGLLayer setBounds:CGRectMake(0, 0, width, height)];
-    [m_webGLLayer setOpaque:(m_internalColorFormat != GL_RGBA8)];
+    [m_webGLLayer setOpaque:!m_attrs.alpha];
 
     [m_contextObj renderbufferStorage:GL_RENDERBUFFER fromDrawable:static_cast<id<EAGLDrawable>>(m_webGLLayer.get())];
 

Modified: branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm (228204 => 228205)


--- branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm	2018-02-07 00:53:36 UTC (rev 228204)
+++ branches/safari-605-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm	2018-02-07 00:53:39 UTC (rev 228205)
@@ -57,6 +57,8 @@
     self.contentsOpaque = !context->getContextAttributes().alpha;
     self.transform = CATransform3DIdentity;
     self.contentsScale = _devicePixelRatio;
+#else
+    self.opaque = !context->getContextAttributes().alpha;
 #endif
     return self;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to