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

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

Issue 2109613003: Revert of Make lines a special case in GrShape (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrShape.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.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 2012 Google Inc. 2 * Copyright 2012 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 "GrSoftwarePathRenderer.h" 8 #include "GrSoftwarePathRenderer.h"
9 #include "GrAuditTrail.h" 9 #include "GrAuditTrail.h"
10 #include "GrClip.h" 10 #include "GrClip.h"
(...skipping 20 matching lines...) Expand all
31 const SkMatrix& matrix, 31 const SkMatrix& matrix,
32 SkIRect* devShapeBounds, 32 SkIRect* devShapeBounds,
33 SkIRect* devClipBounds) { 33 SkIRect* devClipBounds) {
34 // compute bounds as intersection of rt size, clip, and path 34 // compute bounds as intersection of rt size, clip, and path
35 clip.getConservativeBounds(width, height, devClipBounds); 35 clip.getConservativeBounds(width, height, devClipBounds);
36 36
37 if (devClipBounds->isEmpty()) { 37 if (devClipBounds->isEmpty()) {
38 *devShapeBounds = SkIRect::MakeWH(width, height); 38 *devShapeBounds = SkIRect::MakeWH(width, height);
39 return false; 39 return false;
40 } 40 }
41 SkRect shapeBounds = shape.styledBounds(); 41 SkRect shapeBounds;
42 shape.styledBounds(&shapeBounds);
42 if (!shapeBounds.isEmpty()) { 43 if (!shapeBounds.isEmpty()) {
43 SkRect shapeSBounds; 44 SkRect shapeSBounds;
44 matrix.mapRect(&shapeSBounds, shapeBounds); 45 matrix.mapRect(&shapeSBounds, shapeBounds);
45 SkIRect shapeIBounds; 46 SkIRect shapeIBounds;
46 shapeSBounds.roundOut(&shapeIBounds); 47 shapeSBounds.roundOut(&shapeIBounds);
47 *devShapeBounds = *devClipBounds; 48 *devShapeBounds = *devClipBounds;
48 if (!devShapeBounds->intersect(shapeIBounds)) { 49 if (!devShapeBounds->intersect(shapeIBounds)) {
49 // set the correct path bounds, as this would be used later. 50 // set the correct path bounds, as this would be used later.
50 *devShapeBounds = shapeIBounds; 51 *devShapeBounds = shapeIBounds;
51 return false; 52 return false;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 devShapeBounds); 160 devShapeBounds);
160 161
161 if (inverseFilled) { 162 if (inverseFilled) {
162 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti ngs, 163 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti ngs,
163 *args.fClip, args.fColor, 164 *args.fClip, args.fColor,
164 *args.fViewMatrix, devClipBounds, devShapeBounds); 165 *args.fViewMatrix, devClipBounds, devShapeBounds);
165 } 166 }
166 167
167 return true; 168 return true;
168 } 169 }
OLDNEW
« no previous file with comments | « src/gpu/GrShape.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698