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

Side by Side Diff: src/core/SkScan_Hairline.cpp

Issue 1674813002: increase subdivision for very large cubics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « gm/strokefill.cpp ('k') | no next file » | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkScan.h" 8 #include "SkScan.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkRasterClip.h" 10 #include "SkRasterClip.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 blitter->blitRect(r.fRight - 1, r.fTop + 1, 1, height - 2); // right 185 blitter->blitRect(r.fRight - 1, r.fTop + 1, 1, height - 2); // right
186 blitter->blitH(r.fLeft, r.fBottom - 1, width); // bottom 186 blitter->blitH(r.fLeft, r.fBottom - 1, width); // bottom
187 } 187 }
188 188
189 /////////////////////////////////////////////////////////////////////////////// 189 ///////////////////////////////////////////////////////////////////////////////
190 190
191 #include "SkPath.h" 191 #include "SkPath.h"
192 #include "SkGeometry.h" 192 #include "SkGeometry.h"
193 #include "SkNx.h" 193 #include "SkNx.h"
194 194
195 #define kMaxCubicSubdivideLevel 6 195 #define kMaxCubicSubdivideLevel 9
196 #define kMaxQuadSubdivideLevel 5 196 #define kMaxQuadSubdivideLevel 5
197 197
198 static int compute_int_quad_dist(const SkPoint pts[3]) { 198 static int compute_int_quad_dist(const SkPoint pts[3]) {
199 // compute the vector between the control point ([1]) and the middle of the 199 // compute the vector between the control point ([1]) and the middle of the
200 // line connecting the start and end ([0] and [2]) 200 // line connecting the start and end ([0] and [2])
201 SkScalar dx = SkScalarHalf(pts[0].fX + pts[2].fX) - pts[1].fX; 201 SkScalar dx = SkScalarHalf(pts[0].fX + pts[2].fX) - pts[1].fX;
202 SkScalar dy = SkScalarHalf(pts[0].fY + pts[2].fY) - pts[1].fY; 202 SkScalar dy = SkScalarHalf(pts[0].fY + pts[2].fY) - pts[1].fY;
203 // we want everyone to be positive 203 // we want everyone to be positive
204 dx = SkScalarAbs(dx); 204 dx = SkScalarAbs(dx);
205 dy = SkScalarAbs(dy); 205 dy = SkScalarAbs(dy);
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 679
680 SkAAClipBlitterWrapper wrap; 680 SkAAClipBlitterWrapper wrap;
681 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) { 681 if (!clip.quickContains(r.roundOut().makeOutset(1, 1))) {
682 wrap.init(clip, blitter); 682 wrap.init(clip, blitter);
683 blitter = wrap.getBlitter(); 683 blitter = wrap.getBlitter();
684 clipRgn = &wrap.getRgn(); 684 clipRgn = &wrap.getRgn();
685 } 685 }
686 AntiHairLineRgn(pts, count, clipRgn, blitter); 686 AntiHairLineRgn(pts, count, clipRgn, blitter);
687 } 687 }
688 } 688 }
OLDNEW
« no previous file with comments | « gm/strokefill.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698