texImage2D pixel junk for transparency
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Dec 2009 11:37:14 +0000 (11:37 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Dec 2009 11:37:14 +0000 (11:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=32188

Reviewed by Maciej Stachowiak

Use kCGBlendModeCopy when drawing an image to the intermediate context
used to create a GL texture.

No test as we don't currently have any mechanism to retrieve pixel data
from the webgl context.

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

WebCore/ChangeLog
WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp

index f0e98c74c1bbf4703618f7903766db1a801842f2..82f5285cacdc2df293a85e11ac2627906d83314c 100644 (file)
@@ -1,3 +1,19 @@
+2009-12-06  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Maciej Stachowiak.
+
+        texImage2D pixel junk for transparency
+        https://bugs.webkit.org/show_bug.cgi?id=32188
+
+        Use kCGBlendModeCopy when drawing an image to the intermediate context
+        used to create a GL texture.
+
+        No test as we don't currently have any mechanism to retrieve pixel data
+        from the webgl context.
+
+        * platform/graphics/mac/GraphicsContext3DMac.cpp:
+        (WebCore::imageToTexture):
+
 2009-12-03  Philippe Normand  <pnormand@igalia.com>
 
         Reviewed by Gustavo Noronha.
index 39e5336ca2465c3737ceb10170371b9e6b3819b3..071e2d0b1b3e7ab1295ed47f2da8235a27422e53 100644 (file)
@@ -1132,7 +1132,7 @@ static void imageToTexture(Image* image, unsigned target, unsigned level)
         
     CGContextRef textureContext = CGBitmapContextCreate(textureData, textureWidth, textureHeight, 8, textureWidth * 4, 
                                                         CGImageGetColorSpace(textureImage), kCGImageAlphaPremultipliedLast);
-    
+    CGContextSetBlendMode(textureContext, kCGBlendModeCopy);
     CGContextDrawImage(textureContext, CGRectMake(0, 0, (CGFloat)textureWidth, (CGFloat)textureHeight), textureImage);
     CGContextRelease(textureContext);