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

Side by Side Diff: src/gpu/GrRectBatch.cpp

Issue 1261083003: Use new API everywhere for GrDefaultGeoProcFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup2
Patch Set: tweaks Created 5 years, 4 months 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 | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrTessellatingPathRenderer.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "GrRectBatch.h" 8 #include "GrRectBatch.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 */ 176 */
177 const GrGeometryProcessor* createRectGP() { 177 const GrGeometryProcessor* createRectGP() {
178 using namespace GrDefaultGeoProcFactory; 178 using namespace GrDefaultGeoProcFactory;
179 Color color(Color::kAttribute_Type); 179 Color color(Color::kAttribute_Type);
180 Coverage coverage(this->coverageIgnored() ? Coverage::kNone_Type : Cover age::kSolid_Type); 180 Coverage coverage(this->coverageIgnored() ? Coverage::kNone_Type : Cover age::kSolid_Type);
181 181
182 // if we have a local rect, then we apply the localMatrix directly to th e localRect to 182 // if we have a local rect, then we apply the localMatrix directly to th e localRect to
183 // generate vertex local coords 183 // generate vertex local coords
184 if (this->hasLocalRect()) { 184 if (this->hasLocalRect()) {
185 LocalCoords localCoords(LocalCoords::kHasExplicit_Type); 185 LocalCoords localCoords(LocalCoords::kHasExplicit_Type);
186 return GrDefaultGeoProcFactory::Create(color, coverage, localCoords) ; 186 return GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I());
187 } else { 187 } else {
188 LocalCoords localCoords(LocalCoords::kUsePosition_Type, 188 LocalCoords localCoords(LocalCoords::kUsePosition_Type,
189 this->hasLocalMatrix() ? &this->localMatrix( ) : NULL); 189 this->hasLocalMatrix() ? &this->localMatrix( ) : NULL);
190 return GrDefaultGeoProcFactory::CreateForDeviceSpace(color, coverage , localCoords, 190 return GrDefaultGeoProcFactory::CreateForDeviceSpace(color, coverage , localCoords,
191 this->viewMatri x()); 191 this->viewMatri x());
192 } 192 }
193 } 193 }
194 194
195 195
196 struct BatchTracker { 196 struct BatchTracker {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if (hasLocalMatrix) { 259 if (hasLocalMatrix) {
260 localMatrix = GrTest::TestMatrix(random); 260 localMatrix = GrTest::TestMatrix(random);
261 } 261 }
262 262
263 return GrRectBatch::Create(color, viewMatrix, rect, 263 return GrRectBatch::Create(color, viewMatrix, rect,
264 hasLocalRect ? &localRect : NULL, 264 hasLocalRect ? &localRect : NULL,
265 hasLocalMatrix ? &localMatrix : NULL); 265 hasLocalMatrix ? &localMatrix : NULL);
266 } 266 }
267 267
268 #endif 268 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698