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

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: update code according to Brian's proposal 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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 1730
1731 SkRect storage; 1731 SkRect storage;
1732 const SkRect* bounds = NULL; 1732 const SkRect* bounds = NULL;
1733 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { 1733 if (!path.isInverseFillType() && paint.canComputeFastBounds()) {
1734 const SkRect& pathBounds = path.getBounds(); 1734 const SkRect& pathBounds = path.getBounds();
1735 bounds = &paint.computeFastBounds(pathBounds, &storage); 1735 bounds = &paint.computeFastBounds(pathBounds, &storage);
1736 if (this->quickReject(*bounds)) { 1736 if (this->quickReject(*bounds)) {
1737 return; 1737 return;
1738 } 1738 }
1739 } 1739 }
1740 if (path.isEmpty()) { 1740
1741 SkRect r = path.getBounds();
bsalomon 2014/02/18 17:58:11 const SkRect& ?
yunchao 2014/02/19 01:36:59 Done.
1742 if (r.width() <= 0 && r.height() <= 0) {
1741 if (path.isInverseFillType()) { 1743 if (path.isInverseFillType()) {
1742 this->internalDrawPaint(paint); 1744 this->internalDrawPaint(paint);
1743 } 1745 }
1744 return; 1746 return;
1745 } 1747 }
1746 1748
1747 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) 1749 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds)
1748 1750
1749 while (iter.next()) { 1751 while (iter.next()) {
1750 iter.fDevice->drawPath(iter, path, looper.paint()); 1752 iter.fDevice->drawPath(iter, path, looper.paint());
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 return *paint; 2234 return *paint;
2233 } 2235 }
2234 2236
2235 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } 2237 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
2236 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } 2238 int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
2237 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } 2239 int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
2238 2240
2239 /////////////////////////////////////////////////////////////////////////////// 2241 ///////////////////////////////////////////////////////////////////////////////
2240 2242
2241 SkCanvas::ClipVisitor::~ClipVisitor() { } 2243 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