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

Side by Side Diff: src/gpu/batches/GrAAStrokeRectBatch.cpp

Issue 2185063002: require semi at the end of SkASSERT and friends (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refactor do while as macro Created 4 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/GrStyle.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.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 "GrAAStrokeRectBatch.h" 8 #include "GrAAStrokeRectBatch.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 class AAStrokeRectBatch : public GrVertexBatch { 119 class AAStrokeRectBatch : public GrVertexBatch {
120 public: 120 public:
121 DEFINE_BATCH_CLASS_ID 121 DEFINE_BATCH_CLASS_ID
122 122
123 AAStrokeRectBatch(GrColor color, const SkMatrix& viewMatrix, 123 AAStrokeRectBatch(GrColor color, const SkMatrix& viewMatrix,
124 const SkRect& devOutside, const SkRect& devInside) 124 const SkRect& devOutside, const SkRect& devInside)
125 : INHERITED(ClassID()) 125 : INHERITED(ClassID())
126 , fViewMatrix(viewMatrix) { 126 , fViewMatrix(viewMatrix) {
127 SkASSERT(!devOutside.isEmpty()) 127 SkASSERT(!devOutside.isEmpty());
128 SkASSERT(!devInside.isEmpty()) 128 SkASSERT(!devInside.isEmpty());
129 129
130 fGeoData.emplace_back(Geometry{color, devOutside, devOutside, devInside, false}); 130 fGeoData.emplace_back(Geometry{color, devOutside, devOutside, devInside, false});
131 this->setBounds(devOutside, HasAABloat::kYes, IsZeroArea::kNo); 131 this->setBounds(devOutside, HasAABloat::kYes, IsZeroArea::kNo);
132 fMiterStroke = true; 132 fMiterStroke = true;
133 } 133 }
134 134
135 static GrDrawBatch* Create(GrColor color, const SkMatrix& viewMatrix, const SkRect& rect, 135 static GrDrawBatch* Create(GrColor color, const SkMatrix& viewMatrix, const SkRect& rect,
136 const SkStrokeRec& stroke) { 136 const SkStrokeRec& stroke) {
137 bool isMiter; 137 bool isMiter;
138 if (!allowed_stroke(stroke, &isMiter)) { 138 if (!allowed_stroke(stroke, &isMiter)) {
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle); 613 SkStrokeRec rec(SkStrokeRec::kFill_InitStyle);
614 rec.setStrokeStyle(strokeWidth); 614 rec.setStrokeStyle(strokeWidth);
615 rec.setStrokeParams(SkPaint::kButt_Cap, 615 rec.setStrokeParams(SkPaint::kButt_Cap,
616 miterStroke ? SkPaint::kMiter_Join : SkPaint::kBevel_Joi n, 616 miterStroke ? SkPaint::kMiter_Join : SkPaint::kBevel_Joi n,
617 1.f); 617 1.f);
618 SkMatrix matrix = GrTest::TestMatrixRectStaysRect(random); 618 SkMatrix matrix = GrTest::TestMatrixRectStaysRect(random);
619 return GrAAStrokeRectBatch::Create(color, matrix, rect, rec); 619 return GrAAStrokeRectBatch::Create(color, matrix, rect, rec);
620 } 620 }
621 621
622 #endif 622 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrStyle.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698