| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrPathProcessor.h" | 8 #include "GrPathProcessor.h" |
| 9 | 9 |
| 10 #include "gl/GrGLPathProcessor.h" | 10 #include "gl/GrGLPathProcessor.h" |
| 11 #include "gl/GrGLGpu.h" | 11 #include "gl/GrGLGpu.h" |
| 12 | 12 |
| 13 #include "glsl/GrGLSLCaps.h" | 13 #include "glsl/GrGLSLCaps.h" |
| 14 | 14 |
| 15 GrPathProcessor::GrPathProcessor(GrColor color, | 15 GrPathProcessor::GrPathProcessor(GrColor color, |
| 16 const GrPipelineOptimizations& opts, |
| 16 const SkMatrix& viewMatrix, | 17 const SkMatrix& viewMatrix, |
| 17 const SkMatrix& localMatrix) | 18 const SkMatrix& localMatrix) |
| 18 : INHERITED(true) | 19 : INHERITED(true) |
| 19 , fColor(color) | 20 , fColor(color) |
| 20 , fViewMatrix(viewMatrix) | 21 , fViewMatrix(viewMatrix) |
| 21 , fLocalMatrix(localMatrix) { | 22 , fLocalMatrix(localMatrix) |
| 23 , fOpts(opts) { |
| 22 this->initClassID<GrPathProcessor>(); | 24 this->initClassID<GrPathProcessor>(); |
| 23 } | 25 } |
| 24 | 26 |
| 25 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const
{ | 27 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const
{ |
| 26 out->setKnownFourComponents(fColor); | 28 out->setKnownFourComponents(fColor); |
| 27 } | 29 } |
| 28 | 30 |
| 29 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
st { | 31 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
st { |
| 30 out->setKnownSingleComponent(0xff); | 32 out->setKnownSingleComponent(0xff); |
| 31 } | 33 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 const GrGLSLCaps& caps, | 81 const GrGLSLCaps& caps, |
| 80 GrProcessorKeyBuilder* b) const { | 82 GrProcessorKeyBuilder* b) const { |
| 81 GrGLPathProcessor::GenKey(*this, bt, caps, b); | 83 GrGLPathProcessor::GenKey(*this, bt, caps, b); |
| 82 } | 84 } |
| 83 | 85 |
| 84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker&
bt, | 86 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker&
bt, |
| 85 const GrGLSLCaps& caps
) const { | 87 const GrGLSLCaps& caps
) const { |
| 86 SkASSERT(caps.pathRenderingSupport()); | 88 SkASSERT(caps.pathRenderingSupport()); |
| 87 return new GrGLPathProcessor(*this, bt); | 89 return new GrGLPathProcessor(*this, bt); |
| 88 } | 90 } |
| OLD | NEW |