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

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

Issue 166023002: fix the visual difference of raster vs gpu -- inverse_paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase code Created 6 years, 10 months 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 | « expectations/gm/ignored-tests.txt ('k') | 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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 1739
1740 SkRect storage; 1740 SkRect storage;
1741 const SkRect* bounds = NULL; 1741 const SkRect* bounds = NULL;
1742 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { 1742 if (!path.isInverseFillType() && paint.canComputeFastBounds()) {
1743 const SkRect& pathBounds = path.getBounds(); 1743 const SkRect& pathBounds = path.getBounds();
1744 bounds = &paint.computeFastBounds(pathBounds, &storage); 1744 bounds = &paint.computeFastBounds(pathBounds, &storage);
1745 if (this->quickReject(*bounds)) { 1745 if (this->quickReject(*bounds)) {
1746 return; 1746 return;
1747 } 1747 }
1748 } 1748 }
1749 if (path.isEmpty()) { 1749
1750 const SkRect& r = path.getBounds();
1751 if (r.width() <= 0 && r.height() <= 0) {
reed2 2014/02/21 10:48:49 Do we have unit-tests added to exercise this? Does
yunchao 2014/02/24 03:07:20 Hi Mike, Do you think we need to add a unit-tests
1750 if (path.isInverseFillType()) { 1752 if (path.isInverseFillType()) {
1751 this->internalDrawPaint(paint); 1753 this->internalDrawPaint(paint);
1752 } 1754 }
1753 return; 1755 return;
1754 } 1756 }
1755 1757
1756 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) 1758 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds)
1757 1759
1758 while (iter.next()) { 1760 while (iter.next()) {
1759 iter.fDevice->drawPath(iter, path, looper.paint()); 1761 iter.fDevice->drawPath(iter, path, looper.paint());
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 return *paint; 2243 return *paint;
2242 } 2244 }
2243 2245
2244 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } 2246 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
2245 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } 2247 int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
2246 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } 2248 int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
2247 2249
2248 /////////////////////////////////////////////////////////////////////////////// 2250 ///////////////////////////////////////////////////////////////////////////////
2249 2251
2250 SkCanvas::ClipVisitor::~ClipVisitor() { } 2252 SkCanvas::ClipVisitor::~ClipVisitor() { }
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698