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 |
17 //////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////// |
18 | 23 |
19 /** | 24 /** |
20 * Path.bounds is defined to be the bounds of all the control points. | 25 * Path.bounds is defined to be the bounds of all the control points. |
21 * If we called bounds.join(r) we would skip r if r was empty, which breaks | 26 * If we called bounds.join(r) we would skip r if r was empty, which breaks |
22 * our promise. Hence we have a custom joiner that doesn't look at emptiness | 27 * our promise. Hence we have a custom joiner that doesn't look at emptiness |
23 */ | 28 */ |
24 static void joinNoEmptyChecks(SkRect* dst, const SkRect& src) { | 29 static void joinNoEmptyChecks(SkRect* dst, const SkRect& src) { |
25 dst->fLeft = SkMinScalar(dst->fLeft, src.fLeft); | 30 dst->fLeft = SkMinScalar(dst->fLeft, src.fLeft); |
26 dst->fTop = SkMinScalar(dst->fTop, src.fTop); | 31 dst->fTop = SkMinScalar(dst->fTop, src.fTop); |
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2927 switch (this->getFillType()) { | 2932 switch (this->getFillType()) { |
2928 case SkPath::kEvenOdd_FillType: | 2933 case SkPath::kEvenOdd_FillType: |
2929 case SkPath::kInverseEvenOdd_FillType: | 2934 case SkPath::kInverseEvenOdd_FillType: |
2930 w &= 1; | 2935 w &= 1; |
2931 break; | 2936 break; |
2932 default: | 2937 default: |
2933 break; | 2938 break; |
2934 } | 2939 } |
2935 return SkToBool(w); | 2940 return SkToBool(w); |
2936 } | 2941 } |
OLD | NEW |