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

Side by Side Diff: src/gpu/GrAAHairLinePathRenderer.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/GrAAHairLinePathRenderer.h ('k') | src/gpu/GrAALinearizingConvexPathRenderer.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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 class AAHairlineBatch : public GrVertexBatch { 673 class AAHairlineBatch : public GrVertexBatch {
674 public: 674 public:
675 struct Geometry { 675 struct Geometry {
676 GrColor fColor; 676 GrColor fColor;
677 uint8_t fCoverage; 677 uint8_t fCoverage;
678 SkMatrix fViewMatrix; 678 SkMatrix fViewMatrix;
679 SkPath fPath; 679 SkPath fPath;
680 SkIRect fDevClipBounds; 680 SkIRect fDevClipBounds;
681 }; 681 };
682 682
683 static GrDrawBatch* Create(const Geometry& geometry) { 683 static GrDrawBatch* Create(const Geometry& geometry) { return new AAHairline Batch(geometry); }
684 return SkNEW_ARGS(AAHairlineBatch, (geometry));
685 }
686 684
687 const char* name() const override { return "AAHairlineBatch"; } 685 const char* name() const override { return "AAHairlineBatch"; }
688 686
689 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 687 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
690 // When this is called on a batch, there is only one geometry bundle 688 // When this is called on a batch, there is only one geometry bundle
691 out->setKnownFourComponents(fGeoData[0].fColor); 689 out->setKnownFourComponents(fGeoData[0].fColor);
692 } 690 }
693 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 691 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
694 out->setUnknownSingleComponent(); 692 out->setUnknownSingleComponent();
695 } 693 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 GrColor color = GrRandomColor(random); 989 GrColor color = GrRandomColor(random);
992 SkMatrix viewMatrix = GrTest::TestMatrix(random); 990 SkMatrix viewMatrix = GrTest::TestMatrix(random);
993 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); 991 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle);
994 SkPath path = GrTest::TestPath(random); 992 SkPath path = GrTest::TestPath(random);
995 SkIRect devClipBounds; 993 SkIRect devClipBounds;
996 devClipBounds.setEmpty(); 994 devClipBounds.setEmpty();
997 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ; 995 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds) ;
998 } 996 }
999 997
1000 #endif 998 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.h ('k') | src/gpu/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698