OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |