Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: include/gpu/GrPaint.h

Issue 820523002: initial changes to add local matrix to primitive processor (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup-ccm-above-context
Patch Set: clean up of comment around get_transform_matrix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 /** 153 /**
154 * Returns true if isOpaque would return true and the paint represents a sol id constant color 154 * Returns true if isOpaque would return true and the paint represents a sol id constant color
155 * draw. If the result is true, constantColor will be updated to contain the constant color. 155 * draw. If the result is true, constantColor will be updated to contain the constant color.
156 */ 156 */
157 bool isOpaqueAndConstantColor(GrColor* constantColor) const; 157 bool isOpaqueAndConstantColor(GrColor* constantColor) const;
158 158
159 /** 159 /**
160 * DO NOT USE THESE 160 * DO NOT USE THESE
161 * TODO Remove remaining use cases and delete these 161 * TODO Remove remaining use cases and delete these
162 */ 162 */
163 void localCoordChange(const SkMatrix& oldToNew) {
164 for (int i = 0; i < fColorStages.count(); ++i) {
165 fColorStages[i].localCoordChange(oldToNew);
166 }
167 for (int i = 0; i < fCoverageStages.count(); ++i) {
168 fCoverageStages[i].localCoordChange(oldToNew);
169 }
170 }
171
172 bool localCoordChangeInverse(const SkMatrix& newToOld) { 163 bool localCoordChangeInverse(const SkMatrix& newToOld) {
173 SkMatrix oldToNew; 164 SkMatrix oldToNew;
174 bool computed = false; 165 bool computed = false;
175 for (int i = 0; i < fColorStages.count(); ++i) { 166 for (int i = 0; i < fColorStages.count(); ++i) {
176 if (!computed && !newToOld.invert(&oldToNew)) { 167 if (!computed && !newToOld.invert(&oldToNew)) {
177 return false; 168 return false;
178 } else { 169 } else {
179 computed = true; 170 computed = true;
180 } 171 }
181 fColorStages[i].localCoordChange(oldToNew); 172 fColorStages[i].localCoordChange(oldToNew);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 206 }
216 207
217 void resetColor() { 208 void resetColor() {
218 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); 209 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff);
219 } 210 }
220 211
221 void resetStages(); 212 void resetStages();
222 }; 213 };
223 214
224 #endif 215 #endif
OLDNEW
« no previous file with comments | « gm/coloremoji.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | src/gpu/GrGeometryProcessor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698