| 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 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } | 120 } |
| 121 bool hasLocalMatrix() const { return NULL != fMatrix; } | 121 bool hasLocalMatrix() const { return NULL != fMatrix; } |
| 122 | 122 |
| 123 Type fType; | 123 Type fType; |
| 124 const SkMatrix* fMatrix; | 124 const SkMatrix* fMatrix; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 const GrGeometryProcessor* Create(const Color&, | 127 const GrGeometryProcessor* Create(const Color&, |
| 128 const Coverage&, | 128 const Coverage&, |
| 129 const LocalCoords&, | 129 const LocalCoords&, |
| 130 const SkMatrix& viewMatrix); | 130 const SkMatrix& viewMatrix = SkMatrix::I()
); |
| 131 | 131 |
| 132 /* | 132 /* |
| 133 * Use this factory to create a GrGeometryProcessor that expects a device sp
ace vertex position | 133 * Use this factory to create a GrGeometryProcessor that expects a device sp
ace vertex position |
| 134 * attribute. The view matrix must still be provided to compute correctly tr
ansformed | 134 * attribute. The view matrix must still be provided to compute correctly tr
ansformed |
| 135 * coordinates for GrFragmentProcessors. It may fail if the view matrix is n
ot invertible. | 135 * coordinates for GrFragmentProcessors. It may fail if the view matrix is n
ot invertible. |
| 136 */ | 136 */ |
| 137 const GrGeometryProcessor* CreateForDeviceSpace(const Color&, | 137 const GrGeometryProcessor* CreateForDeviceSpace(const Color&, |
| 138 const Coverage&, | 138 const Coverage&, |
| 139 const LocalCoords&, | 139 const LocalCoords&, |
| 140 const SkMatrix& viewMatrix); | 140 const SkMatrix& viewMatrix); |
| 141 | 141 |
| 142 // TODO deprecate this |
| 143 const GrGeometryProcessor* Create(uint32_t gpTypeFlags, |
| 144 GrColor, |
| 145 bool localCoordsWillBeRead, |
| 146 bool coverageWillBeIgnored, |
| 147 const SkMatrix& viewMatrix = SkMatrix::I()
, |
| 148 const SkMatrix& localMatrix = SkMatrix::I(
), |
| 149 uint8_t coverage = 0xff); |
| 150 |
| 142 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); } | 151 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); } |
| 143 }; | 152 }; |
| 144 | 153 |
| 145 #endif | 154 #endif |
| OLD | NEW |