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

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

Issue 2127673002: Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@AAStrokeRect
Patch Set: update for instanced rendering Created 4 years, 5 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/batches/GrStencilPathBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('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 "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrAuditTrail.h" 10 #include "GrAuditTrail.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 const SkRect& clipBounds) 231 const SkRect& clipBounds)
232 : INHERITED(ClassID()) 232 : INHERITED(ClassID())
233 , fColor(color) 233 , fColor(color)
234 , fShape(shape) 234 , fShape(shape)
235 , fViewMatrix(viewMatrix) { 235 , fViewMatrix(viewMatrix) {
236 const SkRect& pathBounds = shape.bounds(); 236 const SkRect& pathBounds = shape.bounds();
237 fClipBounds = clipBounds; 237 fClipBounds = clipBounds;
238 // Because the clip bounds are used to add a contour for inverse fills, they must also 238 // Because the clip bounds are used to add a contour for inverse fills, they must also
239 // include the path bounds. 239 // include the path bounds.
240 fClipBounds.join(pathBounds); 240 fClipBounds.join(pathBounds);
241 if (shape.inverseFilled()) { 241 const SkRect& srcBounds = shape.inverseFilled() ? fClipBounds : pathBoun ds;
242 fBounds = fClipBounds; 242 this->setTransformedBounds(srcBounds, viewMatrix, HasAABloat::kNo, IsZer oArea::kNo);
243 } else {
244 fBounds = pathBounds;
245 }
246 viewMatrix.mapRect(&fBounds);
247 } 243 }
248 244
249 GrColor fColor; 245 GrColor fColor;
250 GrShape fShape; 246 GrShape fShape;
251 SkMatrix fViewMatrix; 247 SkMatrix fViewMatrix;
252 SkRect fClipBounds; // in source space 248 SkRect fClipBounds; // in source space
253 GrXPOverridesForBatch fPipelineInfo; 249 GrXPOverridesForBatch fPipelineInfo;
254 250
255 typedef GrVertexBatch INHERITED; 251 typedef GrVertexBatch INHERITED;
256 }; 252 };
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 vmi.mapRect(&clipBounds); 296 vmi.mapRect(&clipBounds);
301 GrStyle style; 297 GrStyle style;
302 do { 298 do {
303 GrTest::TestStyle(random, &style); 299 GrTest::TestStyle(random, &style);
304 } while (style.strokeRec().isHairlineStyle()); 300 } while (style.strokeRec().isHairlineStyle());
305 GrShape shape(path, style); 301 GrShape shape(path, style);
306 return TessellatingPathBatch::Create(color, shape, viewMatrix, clipBounds); 302 return TessellatingPathBatch::Create(color, shape, viewMatrix, clipBounds);
307 } 303 }
308 304
309 #endif 305 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStencilPathBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698