RESOLVED FIXED36737
Eliminate use of GL_BGRA in GraphicsContext3DSkia.cpp
https://bugs.webkit.org/show_bug.cgi?id=36737
Summary Eliminate use of GL_BGRA in GraphicsContext3DSkia.cpp
Kenneth Russell
Reported 2010-03-28 19:34:21 PDT
GraphicsContext3DSkia.cpp currently assumes it is running on desktop GL and uses the GL_BGRA format, which is not part of OpenGL ES 2.0. This code should swizzle the red and blue channels manually and use the GL_RGBA format.
Attachments
Patch (1.87 KB, patch)
2010-03-28 19:39 PDT, Kenneth Russell
fishd: review+
kbr: commit-queue-
Revised patch (1.99 KB, patch)
2010-03-29 10:41 PDT, Kenneth Russell
no flags
Kenneth Russell
Comment 1 2010-03-28 19:39:04 PDT
WebKit Review Bot
Comment 2 2010-03-29 00:02:12 PDT
Attachment 51874 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp:31: Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Fisher (:fishd, Google)
Comment 3 2010-03-29 08:36:52 PDT
Comment on attachment 51874 [details] Patch > Index: WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp > + // FIXME: add GL_BGRA extension support > + for (int i = 0; i < size; i += 4) > + std::swap(outputVector[i], outputVector[i + 2]); > + *format = RGBA; > return true; > } ^^^ it would be nice to add a comment above the loop explaining that you are converting from BGRA to RGBA. r=me with such a comment
Kenneth Russell
Comment 4 2010-03-29 10:41:00 PDT
Created attachment 51928 [details] Revised patch Revised patch addressing review feedback and style issue.
Kenneth Russell
Comment 5 2010-03-29 11:28:30 PDT
Comment on attachment 51928 [details] Revised patch Clearing flags on attachment: 51928 Committed r56735: <http://trac.webkit.org/changeset/56735>
Kenneth Russell
Comment 6 2010-03-29 11:28:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.