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 | 10 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 if (!hasChromiumPathRendering && | 662 if (!hasChromiumPathRendering && |
663 ctxInfo.version() < GR_GL_VER(3, 1)) { | 663 ctxInfo.version() < GR_GL_VER(3, 1)) { |
664 return false; | 664 return false; |
665 } | 665 } |
666 } | 666 } |
667 // We only support v1.3+ of GL_NV_path_rendering which allows us to | 667 // We only support v1.3+ of GL_NV_path_rendering which allows us to |
668 // set individual fragment inputs with ProgramPathFragmentInputGen. The API | 668 // set individual fragment inputs with ProgramPathFragmentInputGen. The API |
669 // additions are detected by checking the existence of the function. | 669 // additions are detected by checking the existence of the function. |
670 // We also use *Then* functions that not all drivers might have. Check | 670 // We also use *Then* functions that not all drivers might have. Check |
671 // them for consistency. | 671 // them for consistency. |
672 if (nullptr == gli->fFunctions.fStencilThenCoverFillPath || | 672 if (!gli->fFunctions.fStencilThenCoverFillPath || |
673 nullptr == gli->fFunctions.fStencilThenCoverStrokePath || | 673 !gli->fFunctions.fStencilThenCoverStrokePath || |
674 nullptr == gli->fFunctions.fStencilThenCoverFillPathInstanced || | 674 !gli->fFunctions.fStencilThenCoverFillPathInstanced || |
675 nullptr == gli->fFunctions.fStencilThenCoverStrokePathInstanced || | 675 !gli->fFunctions.fStencilThenCoverStrokePathInstanced || |
676 nullptr == gli->fFunctions.fProgramPathFragmentInputGen) { | 676 !gli->fFunctions.fProgramPathFragmentInputGen) { |
677 return false; | 677 return false; |
678 } | 678 } |
679 return true; | 679 return true; |
680 } | 680 } |
681 | 681 |
682 bool GrGLCaps::readPixelsSupported(GrPixelConfig rtConfig, | 682 bool GrGLCaps::readPixelsSupported(GrPixelConfig rtConfig, |
683 GrPixelConfig readConfig, | 683 GrPixelConfig readConfig, |
684 std::function<void (GrGLenum, GrGLint*)> getI
ntegerv, | 684 std::function<void (GrGLenum, GrGLint*)> getI
ntegerv, |
685 std::function<bool ()> bindRenderTarget) cons
t { | 685 std::function<bool ()> bindRenderTarget) cons
t { |
686 // If it's not possible to even have a render target of rtConfig then read p
ixels is | 686 // If it's not possible to even have a render target of rtConfig then read p
ixels is |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1664 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1665 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1665 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1666 fConfigTable[i].fFormats.fExternalFormat[j]); | 1666 fConfigTable[i].fFormats.fExternalFormat[j]); |
1667 } | 1667 } |
1668 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1668 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1669 } | 1669 } |
1670 #endif | 1670 #endif |
1671 } | 1671 } |
1672 | 1672 |
1673 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1673 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |