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

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

Issue 2481703004: Fix the meaning of stop_y (Closed)
Patch Set: Fix the meaning of stop_y Created 4 years, 1 month 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 | « no previous file | 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 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 forceRLE is true, we won't skip the fractional y because it 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 957 // implies that SkAAClip is calling us and there are strict
958 // assertions inside SkAAClip. 958 // assertions inside SkAAClip.
959 if (isSmoothEnough(leftE, riteE, currE, stop_y) && !forceRLE) { 959 if (isSmoothEnough(leftE, riteE, currE, stop_y) && !forceRLE) {
960 local_bot_fixed = SkFixedCeilToFixed(local_bot_fixed); 960 local_bot_fixed = SkFixedCeilToFixed(local_bot_fixed);
961 } 961 }
962 local_bot_fixed = SkMin32(local_bot_fixed, SkIntToFixed(stop_y + 1)); 962 local_bot_fixed = SkMin32(local_bot_fixed, SkIntToFixed(stop_y));
963 963
964 SkFixed left = leftE->fX; 964 SkFixed left = leftE->fX;
965 SkFixed dLeft = leftE->fDX; 965 SkFixed dLeft = leftE->fDX;
966 SkFixed rite = riteE->fX; 966 SkFixed rite = riteE->fX;
967 SkFixed dRite = riteE->fDX; 967 SkFixed dRite = riteE->fDX;
968 if (0 == (dLeft | dRite)) { 968 if (0 == (dLeft | dRite)) {
969 int fullLeft = SkFixedCeilToInt(left); 969 int fullLeft = SkFixedCeilToInt(left);
970 int fullRite = SkFixedFloorToInt(rite); 970 int fullRite = SkFixedFloorToInt(rite);
971 SkFixed partialLeft = SkIntToFixed(fullLeft) - left; 971 SkFixed partialLeft = SkIntToFixed(fullLeft) - left;
972 SkFixed partialRite = rite - SkIntToFixed(fullRite); 972 SkFixed partialRite = rite - SkIntToFixed(fullRite);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 AAAFillPath(path, clip.bwRgn(), blitter); 1341 AAAFillPath(path, clip.bwRgn(), blitter);
1342 } else { 1342 } else {
1343 SkRegion tmp; 1343 SkRegion tmp;
1344 SkAAClipBlitter aaBlitter; 1344 SkAAClipBlitter aaBlitter;
1345 1345
1346 tmp.setRect(clip.getBounds()); 1346 tmp.setRect(clip.getBounds());
1347 aaBlitter.init(blitter, &clip.aaRgn()); 1347 aaBlitter.init(blitter, &clip.aaRgn());
1348 AAAFillPath(path, tmp, &aaBlitter, true); 1348 AAAFillPath(path, tmp, &aaBlitter, true);
1349 } 1349 }
1350 } 1350 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698