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 : fColor(color) | 126 : INHERITED(true) |
| 127 , fColor(color) |
127 , fViewMatrix(viewMatrix) | 128 , fViewMatrix(viewMatrix) |
128 , fLocalMatrix(localMatrix) | 129 , fLocalMatrix(localMatrix) |
129 , fOverrides(overrides) { | 130 , fOverrides(overrides) { |
130 this->initClassID<GrPathProcessor>(); | 131 this->initClassID<GrPathProcessor>(); |
131 } | 132 } |
132 | 133 |
133 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, | 134 void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, |
134 GrProcessorKeyBuilder* b) const { | 135 GrProcessorKeyBuilder* b) const { |
135 GrGLPathProcessor::GenKey(*this, caps, b); | 136 GrGLPathProcessor::GenKey(*this, caps, b); |
136 } | 137 } |
137 | 138 |
138 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps&
caps) const { | 139 GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps&
caps) const { |
139 SkASSERT(caps.pathRenderingSupport()); | 140 SkASSERT(caps.pathRenderingSupport()); |
140 return new GrGLPathProcessor(); | 141 return new GrGLPathProcessor(); |
141 } | 142 } |
OLD | NEW |