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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(GrGLGpu* gpu) | 62 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu) |
63 : GrPathRendering(gpu) { | 63 : GrPathRendering(gpu) { |
64 const GrGLInterface* glInterface = gpu->glInterface(); | |
65 fCaps.bindFragmentInputSupport = | |
66 NULL != glInterface->fFunctions.fBindFragmentInputLocation; | |
67 } | 64 } |
68 | 65 |
69 GrGLPathRendering::~GrGLPathRendering() { | 66 GrGLPathRendering::~GrGLPathRendering() { |
70 } | 67 } |
71 | 68 |
72 void GrGLPathRendering::abandonGpuResources() { | 69 void GrGLPathRendering::abandonGpuResources() { |
73 fPathNameAllocator.reset(NULL); | 70 fPathNameAllocator.reset(NULL); |
74 } | 71 } |
75 | 72 |
76 void GrGLPathRendering::resetContext() { | 73 void GrGLPathRendering::resetContext() { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 GL_CALL(PathStencilFunc(func, stencilSettings.funcRef(GrStencilSettings:
:kFront_Face), | 286 GL_CALL(PathStencilFunc(func, stencilSettings.funcRef(GrStencilSettings:
:kFront_Face), |
290 stencilSettings.funcMask(GrStencilSettings::kFro
nt_Face))); | 287 stencilSettings.funcMask(GrStencilSettings::kFro
nt_Face))); |
291 | 288 |
292 fHWPathStencilSettings = stencilSettings; | 289 fHWPathStencilSettings = stencilSettings; |
293 } | 290 } |
294 } | 291 } |
295 | 292 |
296 inline GrGLGpu* GrGLPathRendering::gpu() { | 293 inline GrGLGpu* GrGLPathRendering::gpu() { |
297 return static_cast<GrGLGpu*>(fGpu); | 294 return static_cast<GrGLGpu*>(fGpu); |
298 } | 295 } |
OLD | NEW |