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

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

Issue 2485243002: Do not call blitV with 0 height (Closed)
Patch Set: Add unit test 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 | tests/PathTest.cpp » ('j') | 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 } 1018 }
1019 } 1019 }
1020 } else { // left and rite are within the same pixel 1020 } else { // left and rite are within the same pixel
1021 if (partialTop > 0) { 1021 if (partialTop > 0) {
1022 blitter->getRealBlitter()->blitV(fullLeft - 1, fullTop - 1, 1, 1022 blitter->getRealBlitter()->blitV(fullLeft - 1, fullTop - 1, 1,
1023 f2a(SkFixedMul_lowprec(partialTop, rite - left))); 1023 f2a(SkFixedMul_lowprec(partialTop, rite - left)));
1024 if (forceRLE) { 1024 if (forceRLE) {
1025 ((RunBasedAdditiveBlitter*)blitter)->flush_if_y_changed( y, y + partialTop); 1025 ((RunBasedAdditiveBlitter*)blitter)->flush_if_y_changed( y, y + partialTop);
1026 } 1026 }
1027 } 1027 }
1028 if (fullBot >= fullTop) { 1028 if (fullBot > fullTop) {
1029 blitter->getRealBlitter()->blitV(fullLeft - 1, fullTop, full Bot - fullTop, 1029 blitter->getRealBlitter()->blitV(fullLeft - 1, fullTop, full Bot - fullTop,
1030 f2a(rite - left)); 1030 f2a(rite - left));
1031 } 1031 }
1032 if (partialBot > 0) { 1032 if (partialBot > 0) {
1033 blitter->getRealBlitter()->blitV(fullLeft - 1, fullBot, 1, 1033 blitter->getRealBlitter()->blitV(fullLeft - 1, fullBot, 1,
1034 f2a(SkFixedMul_lowprec(partialBot, rite - left))); 1034 f2a(SkFixedMul_lowprec(partialBot, rite - left)));
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 y = local_bot_fixed; 1038 y = local_bot_fixed;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 AAAFillPath(path, clip.bwRgn(), blitter); 1344 AAAFillPath(path, clip.bwRgn(), blitter);
1345 } else { 1345 } else {
1346 SkRegion tmp; 1346 SkRegion tmp;
1347 SkAAClipBlitter aaBlitter; 1347 SkAAClipBlitter aaBlitter;
1348 1348
1349 tmp.setRect(clip.getBounds()); 1349 tmp.setRect(clip.getBounds());
1350 aaBlitter.init(blitter, &clip.aaRgn()); 1350 aaBlitter.init(blitter, &clip.aaRgn());
1351 AAAFillPath(path, tmp, &aaBlitter, true); 1351 AAAFillPath(path, tmp, &aaBlitter, true);
1352 } 1352 }
1353 } 1353 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698