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

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

Issue 817283005: use conics for ovals and roundrects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « gyp/skia_for_chromium_defines.gypi ('k') | src/pathops/SkOpEdgeBuilder.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 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 "SkBuffer.h" 8 #include "SkBuffer.h"
9 #include "SkErrorInternals.h" 9 #include "SkErrorInternals.h"
10 #include "SkGeometry.h" 10 #include "SkGeometry.h"
11 #include "SkMath.h" 11 #include "SkMath.h"
12 #include "SkPath.h" 12 #include "SkPath.h"
13 #include "SkPathRef.h" 13 #include "SkPathRef.h"
14 #include "SkRRect.h" 14 #include "SkRRect.h"
15 #include "SkThread.h" 15 #include "SkThread.h"
16 16
17 // These two should be removed once we fix any gpu bugs, and then
18 // just move them into skia_for_chromium_defines.gypi
19 #define SK_SUPPORT_LEGACY_ADDOVAL
20 #define SK_SUPPORT_LEGACY_ADDRRECT
21
22 //////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////
23 18
24 /** 19 /**
25 * Path.bounds is defined to be the bounds of all the control points. 20 * Path.bounds is defined to be the bounds of all the control points.
26 * If we called bounds.join(r) we would skip r if r was empty, which breaks 21 * If we called bounds.join(r) we would skip r if r was empty, which breaks
27 * our promise. Hence we have a custom joiner that doesn't look at emptiness 22 * our promise. Hence we have a custom joiner that doesn't look at emptiness
28 */ 23 */
29 static void joinNoEmptyChecks(SkRect* dst, const SkRect& src) { 24 static void joinNoEmptyChecks(SkRect* dst, const SkRect& src) {
30 dst->fLeft = SkMinScalar(dst->fLeft, src.fLeft); 25 dst->fLeft = SkMinScalar(dst->fLeft, src.fLeft);
31 dst->fTop = SkMinScalar(dst->fTop, src.fTop); 26 dst->fTop = SkMinScalar(dst->fTop, src.fTop);
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 switch (this->getFillType()) { 2927 switch (this->getFillType()) {
2933 case SkPath::kEvenOdd_FillType: 2928 case SkPath::kEvenOdd_FillType:
2934 case SkPath::kInverseEvenOdd_FillType: 2929 case SkPath::kInverseEvenOdd_FillType:
2935 w &= 1; 2930 w &= 1;
2936 break; 2931 break;
2937 default: 2932 default:
2938 break; 2933 break;
2939 } 2934 }
2940 return SkToBool(w); 2935 return SkToBool(w);
2941 } 2936 }
OLDNEW
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698