| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 /* | 76 /* |
| 77 * The following functions are used to create default GPs. If you just need
to create | 77 * The following functions are used to create default GPs. If you just need
to create |
| 78 * attributes seperately from creating the default GP, use the SetAttribs fu
nction followed | 78 * attributes seperately from creating the default GP, use the SetAttribs fu
nction followed |
| 79 * by the Create function. Otherwise use CreateAndSetAttribs to do both at
once. | 79 * by the Create function. Otherwise use CreateAndSetAttribs to do both at
once. |
| 80 * | 80 * |
| 81 * You must unref the return from Create. | 81 * You must unref the return from Create. |
| 82 */ | 82 */ |
| 83 static const GrGeometryProcessor* Create(GrColor, | 83 static const GrGeometryProcessor* Create(GrColor, |
| 84 uint32_t gpTypeFlags = 0, | 84 uint32_t gpTypeFlags = 0, |
| 85 bool opaqueVertexColors = false, | 85 bool opaqueVertexColors = false, |
| 86 uint8_t coverage = 0xff); | 86 uint8_t coverage = 0xff, |
| 87 const SkMatrix& localMatrix = SkMat
rix::I()); |
| 88 |
| 89 static const GrGeometryProcessor* Create(GrColor color, |
| 90 uint32_t gpTypeFlags, |
| 91 const SkMatrix& localMatrix) { |
| 92 return Create(color, gpTypeFlags, false, 0xff, localMatrix); |
| 93 } |
| 94 |
| 87 static size_t DefaultVertexStride() { return sizeof(PositionAttr); } | 95 static size_t DefaultVertexStride() { return sizeof(PositionAttr); } |
| 88 }; | 96 }; |
| 89 | 97 |
| 90 #endif | 98 #endif |
| OLD | NEW |