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

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

Issue 2452393002: Do not skip fractional y for SkAAClip (Closed)
Patch Set: 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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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