[Webkit-unassigned] [Bug 103630] New: [Qt] Remove an unnecessary masking from swapBgrToRgb()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 29 05:59:44 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103630

           Summary: [Qt] Remove an unnecessary masking from swapBgrToRgb()
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rgabor at webkit.org


Now swapBgrToRgb() make two masking to get R and B components to the right place:
   return ((pixel << 16) & 0xff0000) | ((pixel >> 16) & 0xff) | (pixel & 0xff00ff00);

We can get the same result with just one:
   return (((pixel << 16) | (pixel >> 16)) & 0x00ff00ff) | (pixel & 0xff00ff00);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list