Bug 103630 - [Qt] Remove an unnecessary masking from swapBgrToRgb()
Summary: [Qt] Remove an unnecessary masking from swapBgrToRgb()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 06:02 PST by Gabor Rapcsanyi
Modified: 2012-12-03 02:16 PST (History)
5 users (show)

See Also:


Attachments
proposed patch (1.29 KB, patch)
2012-11-29 06:12 PST, Gabor Rapcsanyi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Rapcsanyi 2012-11-29 06:02:01 PST
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);
Comment 1 Gabor Rapcsanyi 2012-11-29 06:12:45 PST
Created attachment 176713 [details]
proposed patch
Comment 2 Zoltan Herczeg 2012-12-03 01:50:51 PST
Comment on attachment 176713 [details]
proposed patch

r=me
Comment 3 WebKit Review Bot 2012-12-03 02:16:09 PST
Comment on attachment 176713 [details]
proposed patch

Clearing flags on attachment: 176713

Committed r136375: <http://trac.webkit.org/changeset/136375>
Comment 4 WebKit Review Bot 2012-12-03 02:16:13 PST
All reviewed patches have been landed.  Closing bug.