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 GrCoordTransform_DEFINED | 8 #ifndef GrCoordTransform_DEFINED |
9 #define GrCoordTransform_DEFINED | 9 #define GrCoordTransform_DEFINED |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 * correct for draws that take explicit local coords rather than inferring t
hem from the | 27 * correct for draws that take explicit local coords rather than inferring t
hem from the |
28 * primitive's positions (e.g. drawVertices). These are usually the coords a
GrProcessor wants. | 28 * primitive's positions (e.g. drawVertices). These are usually the coords a
GrProcessor wants. |
29 */ | 29 */ |
30 kLocal_GrCoordSet, | 30 kLocal_GrCoordSet, |
31 | 31 |
32 /** | 32 /** |
33 * The actual vertex position. Note that GrContext may not draw using the or
iginal view matrix | 33 * The actual vertex position. Note that GrContext may not draw using the or
iginal view matrix |
34 * specified by the caller, as it may have transformed vertices into another
space. These are | 34 * specified by the caller, as it may have transformed vertices into another
space. These are |
35 * usually not the coordinates a GrProcessor wants. | 35 * usually not the coordinates a GrProcessor wants. |
36 */ | 36 */ |
37 kPosition_GrCoordSet | 37 kPosition_GrCoordSet, |
| 38 |
| 39 /** |
| 40 * The position after it has been transformed by the view matrix. |
| 41 */ |
| 42 kDevice_GrCoordSet, |
38 }; | 43 }; |
39 | 44 |
40 /** | 45 /** |
41 * A class representing a linear transformation from one of the built-in coordin
ate sets (local or | 46 * A class representing a linear transformation from one of the built-in coordin
ate sets (local or |
42 * position). GrProcessors just define these transformations, and the framework
does the rest of the | 47 * position). GrProcessors just define these transformations, and the framework
does the rest of the |
43 * work to make the transformed coordinates available in their fragment shader. | 48 * work to make the transformed coordinates available in their fragment shader. |
44 */ | 49 */ |
45 class GrCoordTransform : SkNoncopyable { | 50 class GrCoordTransform : SkNoncopyable { |
46 public: | 51 public: |
47 GrCoordTransform() { SkDEBUGCODE(fInProcessor = false); } | 52 GrCoordTransform() { SkDEBUGCODE(fInProcessor = false); } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 145 |
141 #ifdef SK_DEBUG | 146 #ifdef SK_DEBUG |
142 public: | 147 public: |
143 void setInProcessor() const { fInProcessor = true; } | 148 void setInProcessor() const { fInProcessor = true; } |
144 private: | 149 private: |
145 mutable bool fInProcessor; | 150 mutable bool fInProcessor; |
146 #endif | 151 #endif |
147 }; | 152 }; |
148 | 153 |
149 #endif | 154 #endif |
OLD | NEW |