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

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: cleanup 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
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 /** 144 /**
145 * Returns true if isOpaque would return true and the paint represents a sol id constant color 145 * Returns true if isOpaque would return true and the paint represents a sol id constant color
146 * draw. If the result is true, constantColor will be updated to contain the constant color. 146 * draw. If the result is true, constantColor will be updated to contain the constant color.
147 */ 147 */
148 bool isOpaqueAndConstantColor(GrColor* constantColor) const; 148 bool isOpaqueAndConstantColor(GrColor* constantColor) const;
149 149
150 /** 150 /**
151 * DO NOT USE THESE 151 * DO NOT USE THESE
152 * TODO Remove remaining use cases and delete these 152 * TODO Remove remaining use cases and delete these
153 */ 153 */
154 void localCoordChange(const SkMatrix& oldToNew) {
155 for (int i = 0; i < fColorStages.count(); ++i) {
156 fColorStages[i].localCoordChange(oldToNew);
157 }
158 for (int i = 0; i < fCoverageStages.count(); ++i) {
159 fCoverageStages[i].localCoordChange(oldToNew);
160 }
161 }
162
163 bool localCoordChangeInverse(const SkMatrix& newToOld) { 154 bool localCoordChangeInverse(const SkMatrix& newToOld) {
164 SkMatrix oldToNew; 155 SkMatrix oldToNew;
165 bool computed = false; 156 bool computed = false;
166 for (int i = 0; i < fColorStages.count(); ++i) { 157 for (int i = 0; i < fColorStages.count(); ++i) {
167 if (!computed && !newToOld.invert(&oldToNew)) { 158 if (!computed && !newToOld.invert(&oldToNew)) {
168 return false; 159 return false;
169 } else { 160 } else {
170 computed = true; 161 computed = true;
171 } 162 }
172 fColorStages[i].localCoordChange(oldToNew); 163 fColorStages[i].localCoordChange(oldToNew);
(...skipping 28 matching lines...) Expand all
201 } 192 }
202 193
203 void resetColor() { 194 void resetColor() {
204 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff); 195 fColor = GrColorPackRGBA(0xff, 0xff, 0xff, 0xff);
205 } 196 }
206 197
207 void resetStages(); 198 void resetStages();
208 }; 199 };
209 200
210 #endif 201 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698