Title: [136375] trunk/Source/WebCore
Revision
136375
Author
rga...@webkit.org
Date
2012-12-03 02:15:16 -0800 (Mon, 03 Dec 2012)

Log Message

[Qt] Remove an unnecessary masking from swapBgrToRgb()
https://bugs.webkit.org/show_bug.cgi?id=103630

Reviewed by Zoltan Herczeg.

Get rid of a masking command in swapBgrToRgb() to speed up a little bit.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (136374 => 136375)


--- trunk/Source/WebCore/ChangeLog	2012-12-03 10:01:29 UTC (rev 136374)
+++ trunk/Source/WebCore/ChangeLog	2012-12-03 10:15:16 UTC (rev 136375)
@@ -1,3 +1,15 @@
+2012-12-03  Gabor Rapcsanyi  <rga...@webkit.org>
+
+        [Qt] Remove an unnecessary masking from swapBgrToRgb()
+        https://bugs.webkit.org/show_bug.cgi?id=103630
+
+        Reviewed by Zoltan Herczeg.
+
+        Get rid of a masking command in swapBgrToRgb() to speed up a little bit.
+
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+        (WebCore::swapBgrToRgb):
+
 2012-12-03  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
 
         CSS Device Adaptation: window.innerWidth returns wrong value if CSS viewport descriptors are applied

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


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-12-03 10:01:29 UTC (rev 136374)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-12-03 10:15:16 UTC (rev 136375)
@@ -204,7 +204,7 @@
 
 static inline quint32 swapBgrToRgb(quint32 pixel)
 {
-    return ((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) | (pixel & 0xff00ff00);
+    return (((pixel << 16) | (pixel >> 16)) & 0x00ff00ff) | (pixel & 0xff00ff00);
 }
 
 #if USE(ACCELERATED_COMPOSITING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to