OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "gl/GrGLPathRendering.h" | 8 #include "gl/GrGLPathRendering.h" |
9 #include "gl/GrGLNameAllocator.h" | 9 #include "gl/GrGLNameAllocator.h" |
10 #include "gl/GrGLUtil.h" | 10 #include "gl/GrGLUtil.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu) | 62 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu) |
63 : fGpu(gpu) { | 63 : fGpu(gpu) { |
64 const GrGLInterface* glInterface = gpu->glInterface(); | 64 const GrGLInterface* glInterface = gpu->glInterface(); |
65 fCaps.stencilThenCoverSupport = | 65 fCaps.stencilThenCoverSupport = |
66 NULL != glInterface->fFunctions.fStencilThenCoverFillPath && | 66 NULL != glInterface->fFunctions.fStencilThenCoverFillPath && |
67 NULL != glInterface->fFunctions.fStencilThenCoverStrokePath && | 67 NULL != glInterface->fFunctions.fStencilThenCoverStrokePath && |
68 NULL != glInterface->fFunctions.fStencilThenCoverFillPathInstanced && | 68 NULL != glInterface->fFunctions.fStencilThenCoverFillPathInstanced && |
69 NULL != glInterface->fFunctions.fStencilThenCoverStrokePathInstanced; | 69 NULL != glInterface->fFunctions.fStencilThenCoverStrokePathInstanced; |
70 fCaps.fragmentInputGenSupport = | 70 fCaps.fragmentInputGenSupport = |
71 kGLES_GrGLStandard == glInterface->fStandard && | |
72 NULL != glInterface->fFunctions.fProgramPathFragmentInputGen; | 71 NULL != glInterface->fFunctions.fProgramPathFragmentInputGen; |
73 fCaps.glyphLoadingSupport = | 72 fCaps.glyphLoadingSupport = |
74 NULL != glInterface->fFunctions.fPathMemoryGlyphIndexArray; | 73 NULL != glInterface->fFunctions.fPathMemoryGlyphIndexArray; |
75 | 74 |
76 if (!fCaps.fragmentInputGenSupport) { | 75 if (!fCaps.fragmentInputGenSupport) { |
77 fHWPathTexGenSettings.reset(fGpu->glCaps().maxFixedFunctionTextureCoords
()); | 76 fHWPathTexGenSettings.reset(fGpu->glCaps().maxFixedFunctionTextureCoords
()); |
78 } | 77 } |
79 } | 78 } |
80 | 79 |
81 GrGLPathRendering::~GrGLPathRendering() { | 80 GrGLPathRendering::~GrGLPathRendering() { |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 reference, mask, coverMode,
transformType, | 468 reference, mask, coverMode,
transformType, |
470 transformValues)); | 469 transformValues)); |
471 return; | 470 return; |
472 } | 471 } |
473 | 472 |
474 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase, | 473 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase, |
475 reference, mask, transformType, transform
Values)); | 474 reference, mask, transformType, transform
Values)); |
476 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase, | 475 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase, |
477 coverMode, transformType, transformValues))
; | 476 coverMode, transformType, transformValues))
; |
478 } | 477 } |
OLD | NEW |