| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 default: | 52 default: |
| 53 SkFAIL("Unexpected path fill."); | 53 SkFAIL("Unexpected path fill."); |
| 54 /* fallthrough */; | 54 /* fallthrough */; |
| 55 case kIncClamp_StencilOp: | 55 case kIncClamp_StencilOp: |
| 56 return GR_GL_COUNT_UP; | 56 return GR_GL_COUNT_UP; |
| 57 case kInvert_StencilOp: | 57 case kInvert_StencilOp: |
| 58 return GR_GL_INVERT; | 58 return GR_GL_INVERT; |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 GrGLPathRendering::GrGLPathRendering(GrGpuGL* 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 && | 71 kGLES_GrGLStandard == glInterface->fStandard && |
| 72 NULL != glInterface->fFunctions.fProgramPathFragmentInputGen; | 72 NULL != glInterface->fFunctions.fProgramPathFragmentInputGen; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 reference, mask, coverMode,
transformType, | 469 reference, mask, coverMode,
transformType, |
| 470 transformValues)); | 470 transformValues)); |
| 471 return; | 471 return; |
| 472 } | 472 } |
| 473 | 473 |
| 474 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase, | 474 GL_CALL(StencilStrokePathInstanced(numPaths, pathNameType, paths, pathBase, |
| 475 reference, mask, transformType, transform
Values)); | 475 reference, mask, transformType, transform
Values)); |
| 476 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase, | 476 GL_CALL(CoverStrokePathInstanced(numPaths, pathNameType, paths, pathBase, |
| 477 coverMode, transformType, transformValues))
; | 477 coverMode, transformType, transformValues))
; |
| 478 } | 478 } |
| OLD | NEW |