[Qt][Mac] Fix transparency for WebGL content.
authorzeno.albisser@digia.com <zeno.albisser@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:37:34 +0000 (13:37 +0000)
committerzeno.albisser@digia.com <zeno.albisser@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:37:34 +0000 (13:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104659

When drawing a texture to the TextureMapper the flag SupportsBlending
must be passed in order to allow for transparent webgl content.
We are doing this for GLX already, but the flag was still missing
in GraphicsSurfaceMac.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurface::platformPaintToTextureMapper):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp

index 8c7e434..ee53080 100644 (file)
@@ -1,3 +1,18 @@
+2012-12-11  Zeno Albisser  <zeno@webkit.org>
+
+        [Qt][Mac] Fix transparency for WebGL content.
+        https://bugs.webkit.org/show_bug.cgi?id=104659
+
+        When drawing a texture to the TextureMapper the flag SupportsBlending
+        must be passed in order to allow for transparent webgl content.
+        We are doing this for GLX already, but the flag was still missing
+        in GraphicsSurfaceMac.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
+        (WebCore::GraphicsSurface::platformPaintToTextureMapper):
+
 2012-12-11  Alexander Pavlov  <apavlov@chromium.org>
 
         Web Inspector: Duplicate emulated touch events in iframe
index 5dfc8c5..439bf9a 100644 (file)
@@ -345,7 +345,7 @@ void GraphicsSurface::platformPaintToTextureMapper(TextureMapper* textureMapper,
 {
     TransformationMatrix adjustedTransform = transform;
     adjustedTransform.multiply(TransformationMatrix::rectToRect(FloatRect(FloatPoint::zero(), m_private->size()), targetRect));
-    static_cast<TextureMapperGL*>(textureMapper)->drawTextureRectangleARB(m_private->frontBufferTextureID(), 0, m_private->size(), targetRect, adjustedTransform, opacity, mask);
+    static_cast<TextureMapperGL*>(textureMapper)->drawTextureRectangleARB(m_private->frontBufferTextureID(), TextureMapperGL::SupportsBlending, m_private->size(), targetRect, adjustedTransform, opacity, mask);
 }
 
 uint32_t GraphicsSurface::platformFrontBuffer() const