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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 local->fInputColorType = kUniform_GrGPInput; | 39 local->fInputColorType = kUniform_GrGPInput; |
40 if (!opt.getOverrideColorIfSet(&local->fColor)) { | 40 if (!opt.getOverrideColorIfSet(&local->fColor)) { |
41 local->fColor = this->color(); | 41 local->fColor = this->color(); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 local->fInputCoverageType = opt.readsCoverage() ? kAllOnes_GrGPInput : kIgno
red_GrGPInput; | 45 local->fInputCoverageType = opt.readsCoverage() ? kAllOnes_GrGPInput : kIgno
red_GrGPInput; |
46 local->fUsesLocalCoords = opt.readsLocalCoords(); | 46 local->fUsesLocalCoords = opt.readsLocalCoords(); |
47 } | 47 } |
48 | 48 |
49 bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m, | 49 bool GrPathProcessor::isEqual(const GrBatchTracker& m, |
50 const GrPrimitiveProcessor& that, | 50 const GrPrimitiveProcessor& that, |
51 const GrBatchTracker& t) const { | 51 const GrBatchTracker& t) const { |
52 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that)
) { | 52 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that)
) { |
53 return false; | 53 return false; |
54 } | 54 } |
55 | 55 |
56 const GrPathProcessor& other = that.cast<GrPathProcessor>(); | 56 const GrPathProcessor& other = that.cast<GrPathProcessor>(); |
57 if (!this->viewMatrix().cheapEqualTo(other.viewMatrix())) { | 57 if (!this->viewMatrix().cheapEqualTo(other.viewMatrix())) { |
58 return false; | 58 return false; |
59 } | 59 } |
60 | 60 |
61 const PathBatchTracker& mine = m.cast<PathBatchTracker>(); | 61 const PathBatchTracker& mine = m.cast<PathBatchTracker>(); |
(...skipping 17 matching lines...) Expand all Loading... |
79 const GrGLSLCaps& caps, | 79 const GrGLSLCaps& caps, |
80 GrProcessorKeyBuilder* b) const { | 80 GrProcessorKeyBuilder* b) const { |
81 GrGLPathProcessor::GenKey(*this, bt, caps, b); | 81 GrGLPathProcessor::GenKey(*this, bt, caps, b); |
82 } | 82 } |
83 | 83 |
84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker&
bt, | 84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker&
bt, |
85 const GrGLSLCaps& caps
) const { | 85 const GrGLSLCaps& caps
) const { |
86 SkASSERT(caps.pathRenderingSupport()); | 86 SkASSERT(caps.pathRenderingSupport()); |
87 return new GrGLPathProcessor(*this, bt); | 87 return new GrGLPathProcessor(*this, bt); |
88 } | 88 } |
OLD | NEW |