OLD | NEW |
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 #include "SkPath.h" | 9 #include "SkPath.h" |
10 | 10 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } else { | 306 } else { |
307 if (fIsBW) { | 307 if (fIsBW) { |
308 this->convertToAA(); | 308 this->convertToAA(); |
309 } | 309 } |
310 (void)fAA.op(r, op, doAA); | 310 (void)fAA.op(r, op, doAA); |
311 } | 311 } |
312 return this->updateCacheAndReturnNonEmpty(); | 312 return this->updateCacheAndReturnNonEmpty(); |
313 } | 313 } |
314 | 314 |
315 void SkRasterClip::translate(int dx, int dy, SkRasterClip* dst) const { | 315 void SkRasterClip::translate(int dx, int dy, SkRasterClip* dst) const { |
316 if (NULL == dst) { | 316 if (nullptr == dst) { |
317 return; | 317 return; |
318 } | 318 } |
319 | 319 |
320 AUTO_RASTERCLIP_VALIDATE(*this); | 320 AUTO_RASTERCLIP_VALIDATE(*this); |
321 | 321 |
322 if (this->isEmpty()) { | 322 if (this->isEmpty()) { |
323 dst->setEmpty(); | 323 dst->setEmpty(); |
324 return; | 324 return; |
325 } | 325 } |
326 if (0 == (dx | dy)) { | 326 if (0 == (dx | dy)) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 fAA.validate(); | 379 fAA.validate(); |
380 | 380 |
381 SkASSERT(this->computeIsEmpty() == fIsEmpty); | 381 SkASSERT(this->computeIsEmpty() == fIsEmpty); |
382 SkASSERT(this->computeIsRect() == fIsRect); | 382 SkASSERT(this->computeIsRect() == fIsRect); |
383 } | 383 } |
384 #endif | 384 #endif |
385 | 385 |
386 /////////////////////////////////////////////////////////////////////////////// | 386 /////////////////////////////////////////////////////////////////////////////// |
387 | 387 |
388 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper() { | 388 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper() { |
389 SkDEBUGCODE(fClipRgn = NULL;) | 389 SkDEBUGCODE(fClipRgn = nullptr;) |
390 SkDEBUGCODE(fBlitter = NULL;) | 390 SkDEBUGCODE(fBlitter = nullptr;) |
391 } | 391 } |
392 | 392 |
393 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper(const SkRasterClip& clip, | 393 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper(const SkRasterClip& clip, |
394 SkBlitter* blitter) { | 394 SkBlitter* blitter) { |
395 this->init(clip, blitter); | 395 this->init(clip, blitter); |
396 } | 396 } |
397 | 397 |
398 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper(const SkAAClip* aaclip, | 398 SkAAClipBlitterWrapper::SkAAClipBlitterWrapper(const SkAAClip* aaclip, |
399 SkBlitter* blitter) { | 399 SkBlitter* blitter) { |
400 SkASSERT(blitter); | 400 SkASSERT(blitter); |
(...skipping 12 matching lines...) Expand all Loading... |
413 fBlitter = blitter; | 413 fBlitter = blitter; |
414 } else { | 414 } else { |
415 const SkAAClip& aaclip = clip.aaRgn(); | 415 const SkAAClip& aaclip = clip.aaRgn(); |
416 fBWRgn.setRect(aaclip.getBounds()); | 416 fBWRgn.setRect(aaclip.getBounds()); |
417 fAABlitter.init(blitter, &aaclip); | 417 fAABlitter.init(blitter, &aaclip); |
418 // now our return values | 418 // now our return values |
419 fClipRgn = &fBWRgn; | 419 fClipRgn = &fBWRgn; |
420 fBlitter = &fAABlitter; | 420 fBlitter = &fAABlitter; |
421 } | 421 } |
422 } | 422 } |
OLD | NEW |