| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |