Summary: | [chromium] Test for GL_EXT_bgra in addition to GL_EXT_texture_format_BGRA8888/GL_EXT_read_format_bgra for accelerated paining | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Labour <piman> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED WONTFIX | ||||||||
Severity: | Normal | CC: | jamesr, kbr, nduca, piman | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Antoine Labour
2011-11-03 13:44:44 PDT
Created attachment 113553 [details]
Patch
GL_EXT_texture_format_BGRA8888/GL_EXT_read_format_bgra are GLES2-only extensions. GL_EXT_bgra is a superset of them, on desktop GL, but generally GL drivers don't explicitly expose GL_EXT_texture_format_BGRA8888/GL_EXT_read_format_bgra. Comment on attachment 113553 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113553&action=review Unofficial lgtm > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:118 > + if (extensions->supports("GL_EXT_texture_format_BGRA8888")) is a cleaner way to write this elseif supports->x && supports->y ensureENabled x ensureEnabledY return true else return false Created attachment 113577 [details]
Patch
Comment on attachment 113553 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113553&action=review >> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:118 >> + if (extensions->supports("GL_EXT_texture_format_BGRA8888")) > > is a cleaner way to write this > > elseif supports->x && supports->y > ensureENabled x > ensureEnabledY > return true > else > return false Done. Comment on attachment 113577 [details]
Patch
GraphicsContext3D and Extensions3D have followed the functionality and naming conventions in OpenGL ES 2.0 and extensions. The most consistent way to handle this would be to have the underlying implementation report support for GL_EXT_texture_format_BGRA8888 when running on desktop GL supporting GL_EXT_bgra. This is how Chromium's command buffer implementation works. See src/gpu/command_buffer/service/feature_info.cc. For this reason I'm marking this r-. If you really want to pursue this direction then minimally you need to update the documentation on Extensions3D.h indicating which extensions it supports.
That's fair, I'm doing this chrome-side in http://codereview.chromium.org/8460001/ then. We can close this. |