OLD | NEW |
---|---|
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 if (NULL != fBounder) { | 454 if (NULL != fBounder) { |
455 fBounder->commit(); | 455 fBounder->commit(); |
456 } | 456 } |
457 } | 457 } |
458 private: | 458 private: |
459 SkBounder* fBounder; | 459 SkBounder* fBounder; |
460 }; | 460 }; |
461 | 461 |
462 #include "SkColorPriv.h" | 462 #include "SkColorPriv.h" |
463 | 463 |
464 class AutoValidator { | 464 class AutoValidator { |
scroggo
2013/06/21 18:56:59
It appears this entire class can be removed - I do
reed1
2013/06/21 19:06:30
Done.
| |
465 public: | 465 public: |
466 AutoValidator(SkDevice* device) : fDevice(device) {} | 466 AutoValidator(SkDevice* device) : fDevice(device) {} |
467 ~AutoValidator() { | 467 |
468 #ifdef SK_DEBUG | |
469 const SkBitmap& bm = fDevice->accessBitmap(false); | |
470 if (bm.config() == SkBitmap::kARGB_4444_Config) { | |
471 for (int y = 0; y < bm.height(); y++) { | |
472 const SkPMColor16* p = bm.getAddr16(0, y); | |
473 for (int x = 0; x < bm.width(); x++) { | |
474 SkPMColor16 c = p[x]; | |
475 SkPMColor16Assert(c); | |
476 } | |
477 } | |
478 } | |
479 #endif | |
480 } | |
481 private: | 468 private: |
482 SkDevice* fDevice; | 469 SkDevice* fDevice; |
483 }; | 470 }; |
484 | 471 |
485 ////////// macros to place around the internal draw calls ////////////////// | 472 ////////// macros to place around the internal draw calls ////////////////// |
486 | 473 |
487 #define LOOPER_BEGIN_DRAWDEVICE(paint, type) \ | 474 #define LOOPER_BEGIN_DRAWDEVICE(paint, type) \ |
488 /* AutoValidator validator(fMCRec->fTopLayer->fDevice); */ \ | 475 /* AutoValidator validator(fMCRec->fTopLayer->fDevice); */ \ |
489 this->predrawNotify(); \ | 476 this->predrawNotify(); \ |
490 AutoDrawLooper looper(this, paint, true); \ | 477 AutoDrawLooper looper(this, paint, true); \ |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2241 return *paint; | 2228 return *paint; |
2242 } | 2229 } |
2243 | 2230 |
2244 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2231 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
2245 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2232 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
2246 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2233 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
2247 | 2234 |
2248 /////////////////////////////////////////////////////////////////////////////// | 2235 /////////////////////////////////////////////////////////////////////////////// |
2249 | 2236 |
2250 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2237 SkCanvas::ClipVisitor::~ClipVisitor() { } |
OLD | NEW |