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 #include "GrDefaultGeoProcFactory.h" | 8 #include "GrDefaultGeoProcFactory.h" |
9 | 9 |
10 #include "GrInvariantOutput.h" | 10 #include "GrInvariantOutput.h" |
11 #include "gl/GrGLGeometryProcessor.h" | 11 #include "gl/GrGLGeometryProcessor.h" |
| 12 #include "gl/GrGLUtil.h" |
12 #include "gl/builders/GrGLProgramBuilder.h" | 13 #include "gl/builders/GrGLProgramBuilder.h" |
13 | 14 |
14 /* | 15 /* |
15 * The default Geometry Processor simply takes position and multiplies it by the
uniform view | 16 * The default Geometry Processor simply takes position and multiplies it by the
uniform view |
16 * matrix. It also leaves coverage untouched. Behind the scenes, we may add per
vertex color or | 17 * matrix. It also leaves coverage untouched. Behind the scenes, we may add per
vertex color or |
17 * local coords. | 18 * local coords. |
18 */ | 19 */ |
19 | 20 |
20 enum GPFlag { | 21 enum GPFlag { |
21 kColor_GPFlag = 0x1, | 22 kColor_GPFlag = 0x1, |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 } | 309 } |
309 | 310 |
310 if (localCoords.hasLocalMatrix()) { | 311 if (localCoords.hasLocalMatrix()) { |
311 invert.preConcat(*localCoords.fMatrix); | 312 invert.preConcat(*localCoords.fMatrix); |
312 } | 313 } |
313 } | 314 } |
314 | 315 |
315 LocalCoords inverted(LocalCoords::kUsePosition_Type, &invert); | 316 LocalCoords inverted(LocalCoords::kUsePosition_Type, &invert); |
316 return Create(color, coverage, inverted, SkMatrix::I()); | 317 return Create(color, coverage, inverted, SkMatrix::I()); |
317 } | 318 } |
OLD | NEW |