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

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

Issue 554033003: Revert of allow canvas to force conservative clips (for speed) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkDeviceLooper.h" 8 #include "SkDeviceLooper.h"
9 9
10 SkDeviceLooper::SkDeviceLooper(const SkBitmap& base, 10 SkDeviceLooper::SkDeviceLooper(const SkBitmap& base,
11 const SkRasterClip& rc, 11 const SkRasterClip& rc,
12 const SkIRect& bounds, bool aa) 12 const SkIRect& bounds, bool aa)
13 : fBaseBitmap(base) 13 : fBaseBitmap(base)
14 , fBaseRC(rc) 14 , fBaseRC(rc)
15 , fSubsetRC(rc.isForceConservativeRects()) 15 , fDelta(aa ? kAA_Delta : kBW_Delta)
16 , fDelta(aa ? kAA_Delta : kBW_Delta)
17 { 16 {
18 // sentinels that next() has not yet been called, and so our mapper function s 17 // sentinels that next() has not yet been called, and so our mapper function s
19 // should not be called either. 18 // should not be called either.
20 fCurrBitmap = NULL; 19 fCurrBitmap = NULL;
21 fCurrRC = NULL; 20 fCurrRC = NULL;
22 21
23 if (!rc.isEmpty()) { 22 if (!rc.isEmpty()) {
24 // clip must be contained by the bitmap 23 // clip must be contained by the bitmap
25 SkASSERT(SkIRect::MakeWH(base.width(), base.height()).contains(rc.getBou nds())); 24 SkASSERT(SkIRect::MakeWH(base.width(), base.height()).contains(rc.getBou nds()));
26 } 25 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 while (next_tile(fClippedBounds, fDelta, &fCurrOffset)) { 122 while (next_tile(fClippedBounds, fDelta, &fCurrOffset)) {
124 if (this->computeCurrBitmapAndClip()) { 123 if (this->computeCurrBitmapAndClip()) {
125 return true; 124 return true;
126 } 125 }
127 } 126 }
128 break; 127 break;
129 } 128 }
130 fState = kDone_State; 129 fState = kDone_State;
131 return false; 130 return false;
132 } 131 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698