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