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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 if (this->fRGBA8RenderbufferSupport) { | 402 if (this->fRGBA8RenderbufferSupport) { |
403 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kNo_MSAA] = true; | 403 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kNo_MSAA] = true; |
404 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kYes_MSAA] = true; | 404 fConfigRenderSupport[kRGBA_8888_GrPixelConfig][kYes_MSAA] = true; |
405 } | 405 } |
406 | 406 |
407 if (this->fBGRAFormatSupport) { | 407 if (this->fBGRAFormatSupport) { |
408 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true; | 408 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true; |
409 // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the
list of | 409 // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the
list of |
410 // configs that are color-renderable and can be passed to glRenderBuffer
StorageMultisample. | 410 // configs that are color-renderable and can be passed to glRenderBuffer
StorageMultisample. |
411 // Chromium may have an extension to allow BGRA renderbuffers to work on
desktop platforms. | 411 // Chromium may have an extension to allow BGRA renderbuffers to work on
desktop platforms. |
412 if (ctxInfo.extensions().has("GL_CHROMIUM_renderbuffer_format_BGRA8888")
) { | 412 if (ctxInfo.hasExtension("GL_CHROMIUM_renderbuffer_format_BGRA8888")) { |
413 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true; | 413 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true; |
414 } else { | 414 } else { |
415 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = | 415 fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = |
416 !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers(); | 416 !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers(); |
417 } | 417 } |
418 } | 418 } |
419 | 419 |
420 // If we don't support MSAA then undo any places above where we set a config
as renderable with | 420 // If we don't support MSAA then undo any places above where we set a config
as renderable with |
421 // msaa. | 421 // msaa. |
422 if (kNone_MSFBOType == fMSFBOType) { | 422 if (kNone_MSFBOType == fMSFBOType) { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 655 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
656 r.appendf("Fragment coord conventions support: %s\n", | 656 r.appendf("Fragment coord conventions support: %s\n", |
657 (fFragCoordsConventionSupport ? "YES": "NO")); | 657 (fFragCoordsConventionSupport ? "YES": "NO")); |
658 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 658 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
659 r.appendf("Use non-VBO for dynamic data: %s\n", | 659 r.appendf("Use non-VBO for dynamic data: %s\n", |
660 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 660 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
661 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" :
"NO")); | 661 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" :
"NO")); |
662 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 662 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
663 return r; | 663 return r; |
664 } | 664 } |
OLD | NEW |