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

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

Issue 452533002: Revert of add isRect() check to AAClip, to detect if a soft-clip is really just an irect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/SkRasterClip.h ('k') | tests/AAClipTest.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 2010 Google Inc. 2 * Copyright 2010 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 "SkRasterClip.h" 8 #include "SkRasterClip.h"
9 9
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 return fBW; 216 return fBW;
217 } 217 }
218 218
219 void SkRasterClip::convertToAA() { 219 void SkRasterClip::convertToAA() {
220 AUTO_RASTERCLIP_VALIDATE(*this); 220 AUTO_RASTERCLIP_VALIDATE(*this);
221 221
222 SkASSERT(fIsBW); 222 SkASSERT(fIsBW);
223 fAA.setRegion(fBW); 223 fAA.setRegion(fBW);
224 fIsBW = false; 224 fIsBW = false;
225 225 (void)this->updateCacheAndReturnNonEmpty();
226 // since we are being explicitly asked to convert-to-aa, we pass false so we don't "optimize"
227 // ourselves back to BW.
228 (void)this->updateCacheAndReturnNonEmpty(false);
229 } 226 }
230 227
231 #ifdef SK_DEBUG 228 #ifdef SK_DEBUG
232 void SkRasterClip::validate() const { 229 void SkRasterClip::validate() const {
233 // can't ever assert that fBW is empty, since we may have called forceGetBW 230 // can't ever assert that fBW is empty, since we may have called forceGetBW
234 if (fIsBW) { 231 if (fIsBW) {
235 SkASSERT(fAA.isEmpty()); 232 SkASSERT(fAA.isEmpty());
236 } 233 }
237 234
238 fBW.validate(); 235 fBW.validate();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 fBlitter = blitter; 270 fBlitter = blitter;
274 } else { 271 } else {
275 const SkAAClip& aaclip = clip.aaRgn(); 272 const SkAAClip& aaclip = clip.aaRgn();
276 fBWRgn.setRect(aaclip.getBounds()); 273 fBWRgn.setRect(aaclip.getBounds());
277 fAABlitter.init(blitter, &aaclip); 274 fAABlitter.init(blitter, &aaclip);
278 // now our return values 275 // now our return values
279 fClipRgn = &fBWRgn; 276 fClipRgn = &fBWRgn;
280 fBlitter = &fAABlitter; 277 fBlitter = &fAABlitter;
281 } 278 }
282 } 279 }
OLDNEW
« no previous file with comments | « src/core/SkRasterClip.h ('k') | tests/AAClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698