Summary: | [EFL] Ensure right format is used in SnapshotImageGL. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kalyan <kalyan.kondapally> | ||||||||
Component: | WebKit EFL | Assignee: | Kalyan <kalyan.kondapally> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | benjamin, gyuyoung.kim, laszlo.gombos, lucas.de.marchi, ostap73, rakuco, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 105659 | ||||||||||
Attachments: |
|
Description
Kalyan
2013-03-04 08:24:58 PST
Created attachment 191264 [details]
patch
Comment on attachment 191264 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=191264&action=review > Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.cpp:60 > + > + for (int i = 0; i < totalBytes; i += 4) > + std::swap(buf[i], buf[i + 2]); why this indentation? Created attachment 191328 [details]
patchv2
(In reply to comment #2) > (From update of attachment 191264 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191264&action=review > > > + std::swap(buf[i], buf[i + 2]); > > why this indentation? oops, fixed it now. Comment on attachment 191328 [details] patchv2 View in context: https://bugs.webkit.org/attachment.cgi?id=191328&action=review > Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.cpp:62 > +#if USE(OPENGL_ES_2) > + // Convert to BGRA. > + int totalBytes = width * height * 4; > + > + for (int i = 0; i < totalBytes; i += 4) > + std::swap(buf[i], buf[i + 2]); > +#endif > + It is hard to believe you must do something so inefficient. :( Here: std::swap(buf[i], buf[i + 2]); You swap to 32bits pixels, not 2 * 8 bits component. Created attachment 191629 [details]
patchv3
(In reply to comment #5) > (From update of attachment 191328 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191328&action=review > It is hard to believe you must do something so inefficient. :( > > Here: std::swap(buf[i], buf[i + 2]); > You swap to 32bits pixels, not 2 * 8 bits component. Thanks for highlighting this. Fixed it now. Comment on attachment 191629 [details] patchv3 Clearing flags on attachment: 191629 Committed r144887: <http://trac.webkit.org/changeset/144887> All reviewed patches have been landed. Closing bug. |