OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The Android Open Source Project | 2 * Copyright 2016 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 "SkAntiRun.h" | 8 #include "SkAntiRun.h" |
9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
10 #include "SkEdge.h" | 10 #include "SkEdge.h" |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 945 |
946 leftE->goY(y); | 946 leftE->goY(y); |
947 riteE->goY(y); | 947 riteE->goY(y); |
948 | 948 |
949 if (leftE->fX > riteE->fX || (leftE->fX == riteE->fX && | 949 if (leftE->fX > riteE->fX || (leftE->fX == riteE->fX && |
950 leftE->fDX > riteE->fDX)) { | 950 leftE->fDX > riteE->fDX)) { |
951 SkTSwap(leftE, riteE); | 951 SkTSwap(leftE, riteE); |
952 } | 952 } |
953 | 953 |
954 SkFixed local_bot_fixed = SkMin32(leftE->fLowerY, riteE->fLowerY); | 954 SkFixed local_bot_fixed = SkMin32(leftE->fLowerY, riteE->fLowerY); |
955 // Skip the fractional y if edges are changing smoothly | 955 // Skip the fractional y if edges are changing smoothly. |
956 if (isSmoothEnough(leftE, riteE, currE, stop_y)) { | 956 // If forceRLE is true, we won't skip the fractional y because it |
| 957 // implies that SkAAClip is calling us and there are strict |
| 958 // assertions inside SkAAClip. |
| 959 if (isSmoothEnough(leftE, riteE, currE, stop_y) && !forceRLE) { |
957 local_bot_fixed = SkFixedCeilToFixed(local_bot_fixed); | 960 local_bot_fixed = SkFixedCeilToFixed(local_bot_fixed); |
958 } | 961 } |
959 local_bot_fixed = SkMin32(local_bot_fixed, SkIntToFixed(stop_y + 1)); | 962 local_bot_fixed = SkMin32(local_bot_fixed, SkIntToFixed(stop_y + 1)); |
960 | 963 |
961 SkFixed left = leftE->fX; | 964 SkFixed left = leftE->fX; |
962 SkFixed dLeft = leftE->fDX; | 965 SkFixed dLeft = leftE->fDX; |
963 SkFixed rite = riteE->fX; | 966 SkFixed rite = riteE->fX; |
964 SkFixed dRite = riteE->fDX; | 967 SkFixed dRite = riteE->fDX; |
965 if (0 == (dLeft | dRite)) { | 968 if (0 == (dLeft | dRite)) { |
966 int fullLeft = SkFixedCeilToInt(left); | 969 int fullLeft = SkFixedCeilToInt(left); |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 AAAFillPath(path, clip.bwRgn(), blitter); | 1311 AAAFillPath(path, clip.bwRgn(), blitter); |
1309 } else { | 1312 } else { |
1310 SkRegion tmp; | 1313 SkRegion tmp; |
1311 SkAAClipBlitter aaBlitter; | 1314 SkAAClipBlitter aaBlitter; |
1312 | 1315 |
1313 tmp.setRect(clip.getBounds()); | 1316 tmp.setRect(clip.getBounds()); |
1314 aaBlitter.init(blitter, &clip.aaRgn()); | 1317 aaBlitter.init(blitter, &clip.aaRgn()); |
1315 AAAFillPath(path, tmp, &aaBlitter, true); | 1318 AAAFillPath(path, tmp, &aaBlitter, true); |
1316 } | 1319 } |
1317 } | 1320 } |
OLD | NEW |