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 GrGeometryProcessor_DEFINED | 8 #ifndef GrGeometryProcessor_DEFINED |
9 #define GrGeometryProcessor_DEFINED | 9 #define GrGeometryProcessor_DEFINED |
10 | 10 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return true; | 213 return true; |
214 } | 214 } |
215 | 215 |
216 Attribute fAttribs[kMaxVertexAttribs]; | 216 Attribute fAttribs[kMaxVertexAttribs]; |
217 int fNumAttribs; | 217 int fNumAttribs; |
218 size_t fVertexStride; | 218 size_t fVertexStride; |
219 | 219 |
220 private: | 220 private: |
221 virtual bool hasExplicitLocalCoords() const = 0; | 221 virtual bool hasExplicitLocalCoords() const = 0; |
222 | 222 |
223 SkMatrix fViewMatrix; | 223 const SkMatrix fViewMatrix; |
224 SkMatrix fLocalMatrix; | 224 SkMatrix fLocalMatrix; |
225 | 225 |
226 typedef GrProcessor INHERITED; | 226 typedef GrProcessor INHERITED; |
227 }; | 227 }; |
228 | 228 |
229 /** | 229 /** |
230 * A GrGeometryProcessor is a flexible method for rendering a primitive. The Gr
GeometryProcessor | 230 * A GrGeometryProcessor is a flexible method for rendering a primitive. The Gr
GeometryProcessor |
231 * has complete control over vertex attributes and uniforms(aside from the rende
r target) but it | 231 * has complete control over vertex attributes and uniforms(aside from the rende
r target) but it |
232 * must obey the same contract as any GrPrimitiveProcessor, specifically it must
emit a color and | 232 * must obey the same contract as any GrPrimitiveProcessor, specifically it must
emit a color and |
233 * coverage into the fragment shader. Where this color and coverage come from i
s completely the | 233 * coverage into the fragment shader. Where this color and coverage come from i
s completely the |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 private: | 408 private: |
409 bool hasExplicitLocalCoords() const SK_OVERRIDE { return false; } | 409 bool hasExplicitLocalCoords() const SK_OVERRIDE { return false; } |
410 | 410 |
411 GrColor fColor; | 411 GrColor fColor; |
412 | 412 |
413 typedef GrPrimitiveProcessor INHERITED; | 413 typedef GrPrimitiveProcessor INHERITED; |
414 }; | 414 }; |
415 | 415 |
416 #endif | 416 #endif |
OLD | NEW |