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

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

Issue 18552004: Remove SkRasterClip::setPath(const SkPath&, const SkRasterClip&, bool). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Added some comments. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkRasterClip.h » ('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 /* 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 const SkPath& devPath, SkRegion::Op op, bool doAA) { 1137 const SkPath& devPath, SkRegion::Op op, bool doAA) {
1138 // base is used to limit the size (and therefore memory allocation) of the 1138 // base is used to limit the size (and therefore memory allocation) of the
1139 // region that results from scan converting devPath. 1139 // region that results from scan converting devPath.
1140 SkRegion base; 1140 SkRegion base;
1141 1141
1142 if (SkRegion::kIntersect_Op == op) { 1142 if (SkRegion::kIntersect_Op == op) {
1143 // since we are intersect, we can do better (tighter) with currRgn's 1143 // since we are intersect, we can do better (tighter) with currRgn's
1144 // bounds, than just using the device. However, if currRgn is complex, 1144 // bounds, than just using the device. However, if currRgn is complex,
1145 // our region blitter may hork, so we do that case in two steps. 1145 // our region blitter may hork, so we do that case in two steps.
1146 if (currClip->isRect()) { 1146 if (currClip->isRect()) {
1147 return currClip->setPath(devPath, *currClip, doAA); 1147 // FIXME: we should also be able to do this when currClip->isBW(),
1148 // but relaxing the test above triggers GM asserts in
1149 // SkRgnBuilder::blitH(). We need to investigate what's going on.
1150 return currClip->setPath(devPath, currClip->bwRgn(), doAA);
1148 } else { 1151 } else {
1149 base.setRect(currClip->getBounds()); 1152 base.setRect(currClip->getBounds());
1150 SkRasterClip clip; 1153 SkRasterClip clip;
1151 clip.setPath(devPath, base, doAA); 1154 clip.setPath(devPath, base, doAA);
1152 return currClip->op(clip, op); 1155 return currClip->op(clip, op);
1153 } 1156 }
1154 } else { 1157 } else {
1155 const SkDevice* device = canvas->getDevice(); 1158 const SkDevice* device = canvas->getDevice();
1156 if (!device) { 1159 if (!device) {
1157 return currClip->setEmpty(); 1160 return currClip->setEmpty();
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 return *paint; 2221 return *paint;
2219 } 2222 }
2220 2223
2221 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } 2224 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
2222 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } 2225 int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
2223 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } 2226 int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
2224 2227
2225 /////////////////////////////////////////////////////////////////////////////// 2228 ///////////////////////////////////////////////////////////////////////////////
2226 2229
2227 SkCanvas::ClipVisitor::~ClipVisitor() { } 2230 SkCanvas::ClipVisitor::~ClipVisitor() { }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRasterClip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698