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

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

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Moved code around to make code review easier Created 7 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 | Annotate | Revision Log
OLDNEW
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
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
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() { }
OLDNEW
« include/core/SkDevice.h ('K') | « include/pdf/SkPDFDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698