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 #ifndef GrPrimitiveProcessor_DEFINED | 8 #ifndef GrPrimitiveProcessor_DEFINED |
9 #define GrPrimitiveProcessor_DEFINED | 9 #define GrPrimitiveProcessor_DEFINED |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 GrProcessorKeyBuilder* b) const = 0; | 194 GrProcessorKeyBuilder* b) const = 0; |
195 | 195 |
196 | 196 |
197 /** Returns a new instance of the appropriate *GL* implementation class | 197 /** Returns a new instance of the appropriate *GL* implementation class |
198 for the given GrProcessor; caller is responsible for deleting | 198 for the given GrProcessor; caller is responsible for deleting |
199 the object. */ | 199 the object. */ |
200 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps)
const = 0; | 200 virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps)
const = 0; |
201 | 201 |
202 virtual bool isPathRendering() const { return false; } | 202 virtual bool isPathRendering() const { return false; } |
203 | 203 |
204 /** | |
205 * No Local Coord Transformation is needed in the shader, instead transforme
d local coords will | |
206 * be provided via vertex attribute. | |
207 */ | |
208 virtual bool hasTransformedLocalCoords() const = 0; | |
209 | |
210 virtual GrPixelLocalStorageState getPixelLocalStorageState() const { | 204 virtual GrPixelLocalStorageState getPixelLocalStorageState() const { |
211 return kDisabled_GrPixelLocalStorageState; | 205 return kDisabled_GrPixelLocalStorageState; |
212 } | 206 } |
213 | 207 |
214 /** | 208 /** |
215 * If non-null, overrides the dest color returned by GrGLSLFragmentShaderBui
lder::dstColor(). | 209 * If non-null, overrides the dest color returned by GrGLSLFragmentShaderBui
lder::dstColor(). |
216 */ | 210 */ |
217 virtual const char* getDestColorOverride() const { return nullptr; } | 211 virtual const char* getDestColorOverride() const { return nullptr; } |
218 | 212 |
219 virtual float getSampleShading() const { | 213 virtual float getSampleShading() const { |
(...skipping 12 matching lines...) Expand all Loading... |
232 size_t fVertexStride; | 226 size_t fVertexStride; |
233 | 227 |
234 private: | 228 private: |
235 void notifyRefCntIsZero() const final {}; | 229 void notifyRefCntIsZero() const final {}; |
236 virtual bool hasExplicitLocalCoords() const = 0; | 230 virtual bool hasExplicitLocalCoords() const = 0; |
237 | 231 |
238 typedef GrProcessor INHERITED; | 232 typedef GrProcessor INHERITED; |
239 }; | 233 }; |
240 | 234 |
241 #endif | 235 #endif |
OLD | NEW |