Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 27525006: Add support for GL_CHROMIUM_renderbuffer_format_BGRA8888 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a96526a6b7a7d2f423a1fa597edbff847d6981b6..dce9851ff30147f9ed75e5e04f6830521e6690f6 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -406,8 +406,13 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true;
// The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the list of
// configs that are color-renderable and can be passed to glRenderBufferStorageMultisample.
- fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] =
- !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers();
+ // Chromium may have an extension to allow BGRA renderbuffers to work on desktop platforms.
+ if (ctxInfo.extensions().has("GL_CHROMIUM_renderbuffer_format_BGRA8888")) {
+ fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true;
+ } else {
+ fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] =
+ !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers();
+ }
}
// If we don't support MSAA then undo any places above where we set a config as renderable with
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698