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

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

Issue 2490673002: Do not call blitAntiRect for empty rect (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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 if (partialRite > 0) { 990 if (partialRite > 0) {
991 blitter->blitAntiH(fullRite, fullTop - 1, 991 blitter->blitAntiH(fullRite, fullTop - 1,
992 f2a(SkFixedMul_lowprec(partialTop, partialRite)) ); 992 f2a(SkFixedMul_lowprec(partialTop, partialRite)) );
993 } 993 }
994 if (forceRLE) { 994 if (forceRLE) {
995 ((RunBasedAdditiveBlitter*)blitter)->flush_if_y_changed( y, y + partialTop); 995 ((RunBasedAdditiveBlitter*)blitter)->flush_if_y_changed( y, y + partialTop);
996 } 996 }
997 } 997 }
998 998
999 // Blit all full-height rows from fullTop to fullBot 999 // Blit all full-height rows from fullTop to fullBot
1000 if (fullBot > fullTop) { 1000 if (fullBot > fullTop &&
1001 // SkAAClip cannot handle the empty rect so check the no n-emptiness here
1002 // (bug chromium:662800)
1003 (fullRite > fullLeft || f2a(partialLeft) > 0 || f2a(part ialRite) > 0)) {
1001 blitter->getRealBlitter()->blitAntiRect(fullLeft - 1, fullTo p, 1004 blitter->getRealBlitter()->blitAntiRect(fullLeft - 1, fullTo p,
1002 fullRite - fullLeft, fullBot - fullTop, 1005 fullRite - fullLeft, fullBot - fullTop,
1003 f2a(partialLeft), f2 a(partialRite)); 1006 f2a(partialLeft), f2 a(partialRite));
1004 } 1007 }
1005 1008
1006 if (partialBot > 0) { // blit last partial row 1009 if (partialBot > 0) { // blit last partial row
1007 if (partialLeft > 0) { 1010 if (partialLeft > 0) {
1008 blitter->blitAntiH(fullLeft - 1, fullBot, 1011 blitter->blitAntiH(fullLeft - 1, fullBot,
1009 f2a(SkFixedMul_lowprec(partialBot, pa rtialLeft))); 1012 f2a(SkFixedMul_lowprec(partialBot, pa rtialLeft)));
1010 } 1013 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 AAAFillPath(path, clip.bwRgn(), blitter); 1344 AAAFillPath(path, clip.bwRgn(), blitter);
1342 } else { 1345 } else {
1343 SkRegion tmp; 1346 SkRegion tmp;
1344 SkAAClipBlitter aaBlitter; 1347 SkAAClipBlitter aaBlitter;
1345 1348
1346 tmp.setRect(clip.getBounds()); 1349 tmp.setRect(clip.getBounds());
1347 aaBlitter.init(blitter, &clip.aaRgn()); 1350 aaBlitter.init(blitter, &clip.aaRgn());
1348 AAAFillPath(path, tmp, &aaBlitter, true); 1351 AAAFillPath(path, tmp, &aaBlitter, true);
1349 } 1352 }
1350 } 1353 }
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