Title: [121501] trunk/Source/WebCore
Revision
121501
Author
[email protected]
Date
2012-06-28 18:42:32 -0700 (Thu, 28 Jun 2012)

Log Message

[Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place
https://bugs.webkit.org/show_bug.cgi?id=90229

Reviewed by Luiz Agostini.

For opaque web content in WebKit2, we use the RGB32 image format. When we special-case
it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy.

Covered existing API tests, as this code path is always used when rendering.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::getImageData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121500 => 121501)


--- trunk/Source/WebCore/ChangeLog	2012-06-29 01:30:33 UTC (rev 121500)
+++ trunk/Source/WebCore/ChangeLog	2012-06-29 01:42:32 UTC (rev 121501)
@@ -1,3 +1,18 @@
+2012-06-28  No'am Rosenthal  <[email protected]>
+
+        [Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place
+        https://bugs.webkit.org/show_bug.cgi?id=90229
+
+        Reviewed by Luiz Agostini.
+
+        For opaque web content in WebKit2, we use the RGB32 image format. When we special-case
+        it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy.
+
+        Covered existing API tests, as this code path is always used when rendering.
+
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+        (WebCore::GraphicsContext3D::getImageData):
+
 2012-06-28  James Robinson  <[email protected]>
 
         [chromium] Compile chromium compositor implementation files into separate .lib

Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (121500 => 121501)


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-06-29 01:30:33 UTC (rev 121500)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-06-29 01:42:32 UTC (rev 121501)
@@ -505,6 +505,9 @@
 
     AlphaOp alphaOp = AlphaDoNothing;
     switch (qtImage.format()) {
+    case QImage::Format_RGB32:
+        // For opaque images, we should not premultiply or unmultiply alpha.
+        break;
     case QImage::Format_ARGB32:
         if (premultiplyAlpha)
             alphaOp = AlphaDoPremultiply;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to