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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDrawContext.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 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 public: 213 public:
214 struct Geometry { 214 struct Geometry {
215 GrColor fColor; 215 GrColor fColor;
216 SkPath fPath; 216 SkPath fPath;
217 SkScalar fTolerance; 217 SkScalar fTolerance;
218 }; 218 };
219 219
220 static GrDrawBatch* Create(const Geometry& geometry, uint8_t coverage, 220 static GrDrawBatch* Create(const Geometry& geometry, uint8_t coverage,
221 const SkMatrix& viewMatrix, bool isHairline, 221 const SkMatrix& viewMatrix, bool isHairline,
222 const SkRect& devBounds) { 222 const SkRect& devBounds) {
223 return SkNEW_ARGS(DefaultPathBatch, (geometry, coverage, viewMatrix, isH airline, 223 return new DefaultPathBatch(geometry, coverage, viewMatrix, isHairline, devBounds);
224 devBounds));
225 } 224 }
226 225
227 const char* name() const override { return "DefaultPathBatch"; } 226 const char* name() const override { return "DefaultPathBatch"; }
228 227
229 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 228 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
230 // When this is called on a batch, there is only one geometry bundle 229 // When this is called on a batch, there is only one geometry bundle
231 out->setKnownFourComponents(fGeoData[0].fColor); 230 out->setKnownFourComponents(fGeoData[0].fColor);
232 } 231 }
233 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 232 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
234 out->setKnownSingleComponent(this->coverage()); 233 out->setKnownSingleComponent(this->coverage());
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 geometry.fColor = color; 752 geometry.fColor = color;
754 geometry.fPath = path; 753 geometry.fPath = path;
755 geometry.fTolerance = srcSpaceTol; 754 geometry.fTolerance = srcSpaceTol;
756 755
757 viewMatrix.mapRect(&bounds); 756 viewMatrix.mapRect(&bounds);
758 uint8_t coverage = GrRandomCoverage(random); 757 uint8_t coverage = GrRandomCoverage(random);
759 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 758 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
760 } 759 }
761 760
762 #endif 761 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698