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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 if (this->fRGBA8RenderbufferSupport) { 400 if (this->fRGBA8RenderbufferSupport) {
401 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kNo_MSAA] = true; 401 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kNo_MSAA] = true;
402 fConfigRenderSupport[kRGBA_4444_GrPixelConfig][kYes_MSAA] = false; 402 fConfigRenderSupport[kRGBA_4444_GrPixelConfig][kYes_MSAA] = false;
403 } 403 }
404 404
405 if (this->fBGRAFormatSupport) { 405 if (this->fBGRAFormatSupport) {
406 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true; 406 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true;
407 // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the list of 407 // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the list of
408 // configs that are color-renderable and can be passed to glRenderBuffer StorageMultisample. 408 // configs that are color-renderable and can be passed to glRenderBuffer StorageMultisample.
409 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = 409 // Chromium may have an extension to allow BGRA renderbuffers to work on desktop platforms.
410 !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers(); 410 if (ctxInfo.extensions().has("GL_CHROMIUM_renderbuffer_format_BGRA8888") ) {
411 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true;
412 } else {
413 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] =
414 !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers();
415 }
411 } 416 }
412 417
413 // If we don't support MSAA then undo any places above where we set a config as renderable with 418 // If we don't support MSAA then undo any places above where we set a config as renderable with
414 // msaa. 419 // msaa.
415 if (kNone_MSFBOType == fMSFBOType) { 420 if (kNone_MSFBOType == fMSFBOType) {
416 for (int i = 0; i < kGrPixelConfigCnt; ++i) { 421 for (int i = 0; i < kGrPixelConfigCnt; ++i) {
417 fConfigRenderSupport[i][kYes_MSAA] = false; 422 fConfigRenderSupport[i][kYes_MSAA] = false;
418 } 423 }
419 } 424 }
420 } 425 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 651 GrPrintf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
647 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 652 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
648 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 653 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
649 GrPrintf("Fragment coord conventions support: %s\n", 654 GrPrintf("Fragment coord conventions support: %s\n",
650 (fFragCoordsConventionSupport ? "YES": "NO")); 655 (fFragCoordsConventionSupport ? "YES": "NO"));
651 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 656 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
652 GrPrintf("Use non-VBO for dynamic data: %s\n", 657 GrPrintf("Use non-VBO for dynamic data: %s\n",
653 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 658 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
654 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 659 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
655 } 660 }
OLDNEW
« 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