OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrDefaultGeoProcFactory_DEFINED | 8 #ifndef GrDefaultGeoProcFactory_DEFINED |
9 #define GrDefaultGeoProcFactory_DEFINED | 9 #define GrDefaultGeoProcFactory_DEFINED |
10 | 10 |
11 #include "GrGeometryProcessor.h" | 11 #include "GrGeometryProcessor.h" |
12 | 12 |
13 class GrDrawState; | |
14 | |
15 /* | 13 /* |
16 * A factory for creating default Geometry Processors which simply multiply posi
tion by the uniform | 14 * A factory for creating default Geometry Processors which simply multiply posi
tion by the uniform |
17 * view matrix and wire through color, coverage, UV coords if requested. Right
now this is only | 15 * view matrix and wire through color, coverage, UV coords if requested. Right
now this is only |
18 * used in the creation of optimized draw states because adding default GPs to t
he drawstate can | 16 * used in the creation of optimized draw states because adding default GPs to t
he drawstate can |
19 * interfere with batching due to updating the drawstate. | 17 * interfere with batching due to updating the drawstate. |
20 */ | 18 */ |
21 namespace GrDefaultGeoProcFactory { | 19 namespace GrDefaultGeoProcFactory { |
22 // Structs for adding vertex attributes | 20 // Structs for adding vertex attributes |
23 struct PositionAttr { | 21 struct PositionAttr { |
24 SkPoint fPosition; | 22 SkPoint fPosition; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 */ | 127 */ |
130 const GrGeometryProcessor* CreateForDeviceSpace(const Color&, | 128 const GrGeometryProcessor* CreateForDeviceSpace(const Color&, |
131 const Coverage&, | 129 const Coverage&, |
132 const LocalCoords&, | 130 const LocalCoords&, |
133 const SkMatrix& viewMatrix); | 131 const SkMatrix& viewMatrix); |
134 | 132 |
135 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); } | 133 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); } |
136 }; | 134 }; |
137 | 135 |
138 #endif | 136 #endif |
OLD | NEW |