OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 * installed in the stage. | 121 * installed in the stage. |
122 */ | 122 */ |
123 const SkMatrix& getCoordChangeMatrix() const { | 123 const SkMatrix& getCoordChangeMatrix() const { |
124 if (fCoordChangeMatrixSet) { | 124 if (fCoordChangeMatrixSet) { |
125 return fCoordChangeMatrix; | 125 return fCoordChangeMatrix; |
126 } else { | 126 } else { |
127 return SkMatrix::I(); | 127 return SkMatrix::I(); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
| 131 /* |
| 132 * an overload of the above but compensates for the usage of explicit local
coords |
| 133 */ |
| 134 const SkMatrix& getCoordChangeMatrix(bool explicitLocalCoords) const { |
| 135 if (explicitLocalCoords) { |
| 136 return SkMatrix::I(); |
| 137 } else { |
| 138 return this->getCoordChangeMatrix(); |
| 139 } |
| 140 } |
| 141 |
131 const GrEffect* getEffect() const { return fEffect.get(); } | 142 const GrEffect* getEffect() const { return fEffect.get(); } |
132 | 143 |
133 void convertToPendingExec() { fEffect.convertToPendingExec(); } | 144 void convertToPendingExec() { fEffect.convertToPendingExec(); } |
134 | 145 |
135 private: | 146 private: |
136 bool fCoordChangeMatrixSet; | 147 bool fCoordChangeMatrixSet; |
137 SkMatrix fCoordChangeMatrix; | 148 SkMatrix fCoordChangeMatrix; |
138 GrProgramElementRef<const GrEffect> fEffect; | 149 GrProgramElementRef<const GrEffect> fEffect; |
139 }; | 150 }; |
140 | 151 |
141 #endif | 152 #endif |
OLD | NEW |