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/GrGLGpu.h" | 10 #include "gl/GrGLGpu.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 UniformHandle fColorUniform; | 116 UniformHandle fColorUniform; |
117 GrColor fColor; | 117 GrColor fColor; |
118 | 118 |
119 typedef GrGLSLPrimitiveProcessor INHERITED; | 119 typedef GrGLSLPrimitiveProcessor INHERITED; |
120 }; | 120 }; |
121 | 121 |
122 GrPathProcessor::GrPathProcessor(GrColor color, | 122 GrPathProcessor::GrPathProcessor(GrColor color, |
123 const GrXPOverridesForBatch& overrides, | 123 const GrXPOverridesForBatch& overrides, |
124 const SkMatrix& viewMatrix, | 124 const SkMatrix& viewMatrix, |
125 const SkMatrix& localMatrix) | 125 const SkMatrix& localMatrix) |
126 : INHERITED(true) | 126 : fColor(color) |
127 , fColor(color) | |
128 , fViewMatrix(viewMatrix) | 127 , fViewMatrix(viewMatrix) |
129 , fLocalMatrix(localMatrix) | 128 , fLocalMatrix(localMatrix) |
130 , fOverrides(overrides) { | 129 , fOverrides(overrides) { |
131 this->initClassID<GrPathProcessor>(); | 130 this->initClassID<GrPathProcessor>(); |
132 } | 131 } |
133 | 132 |
134 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, | 133 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, |
135 GrProcessorKeyBuilder* b) const { | 134 GrProcessorKeyBuilder* b) const { |
136 GrGLPathProcessor::GenKey(*this, caps, b); | 135 GrGLPathProcessor::GenKey(*this, caps, b); |
137 } | 136 } |
138 | 137 |
139 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps&
caps) const { | 138 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps&
caps) const { |
140 SkASSERT(caps.pathRenderingSupport()); | 139 SkASSERT(caps.pathRenderingSupport()); |
141 return new GrGLPathProcessor(); | 140 return new GrGLPathProcessor(); |
142 } | 141 } |
OLD | NEW |