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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { | 514 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { |
515 inc_canvas(); | 515 inc_canvas(); |
516 | 516 |
517 this->init(device); | 517 this->init(device); |
518 } | 518 } |
519 | 519 |
520 SkCanvas::SkCanvas(const SkBitmap& bitmap) | 520 SkCanvas::SkCanvas(const SkBitmap& bitmap) |
521 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { | 521 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { |
522 inc_canvas(); | 522 inc_canvas(); |
523 | 523 |
524 this->init(SkNEW_ARGS(SkDevice, (bitmap)))->unref(); | 524 this->init(SkNEW_ARGS(SkRasterDevice, (bitmap)))->unref(); |
525 } | 525 } |
526 | 526 |
527 SkCanvas::~SkCanvas() { | 527 SkCanvas::~SkCanvas() { |
528 // free up the contents of our deque | 528 // free up the contents of our deque |
529 this->restoreToCount(1); // restore everything but the last | 529 this->restoreToCount(1); // restore everything but the last |
530 SkASSERT(0 == fSaveLayerCount); | 530 SkASSERT(0 == fSaveLayerCount); |
531 | 531 |
532 this->internalRestore(); // restore the last, since we're going away | 532 this->internalRestore(); // restore the last, since we're going away |
533 | 533 |
534 SkSafeUnref(fBounder); | 534 SkSafeUnref(fBounder); |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 return *paint; | 2213 return *paint; |
2214 } | 2214 } |
2215 | 2215 |
2216 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2216 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
2217 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2217 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
2218 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2218 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
2219 | 2219 |
2220 /////////////////////////////////////////////////////////////////////////////// | 2220 /////////////////////////////////////////////////////////////////////////////// |
2221 | 2221 |
2222 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2222 SkCanvas::ClipVisitor::~ClipVisitor() { } |
OLD | NEW |