| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 | 576 |
| 577 /////////////////////////////////////////////////////////////////////////////// | 577 /////////////////////////////////////////////////////////////////////////////// |
| 578 | 578 |
| 579 void SkCanvas::flush() { | 579 void SkCanvas::flush() { |
| 580 SkBaseDevice* device = this->getDevice(); | 580 SkBaseDevice* device = this->getDevice(); |
| 581 if (device) { | 581 if (device) { |
| 582 device->flush(); | 582 device->flush(); |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 | 585 |
| 586 SkISize SkCanvas::getDeviceSize() const { | 586 SkISize SkCanvas::getTopLayerSize() const { |
| 587 SkBaseDevice* d = this->getTopDevice(); |
| 588 return d ? SkISize::Make(d->width(), d->height()) : SkISize::Make(0, 0); |
| 589 } |
| 590 |
| 591 SkIPoint SkCanvas::getTopLayerOrigin() const { |
| 592 SkBaseDevice* d = this->getTopDevice(); |
| 593 return d ? d->getOrigin() : SkIPoint::Make(0, 0); |
| 594 } |
| 595 |
| 596 SkISize SkCanvas::getBaseLayerSize() const { |
| 587 SkBaseDevice* d = this->getDevice(); | 597 SkBaseDevice* d = this->getDevice(); |
| 588 return d ? SkISize::Make(d->width(), d->height()) : SkISize::Make(0, 0); | 598 return d ? SkISize::Make(d->width(), d->height()) : SkISize::Make(0, 0); |
| 589 } | 599 } |
| 590 | 600 |
| 591 SkBaseDevice* SkCanvas::getDevice() const { | 601 SkBaseDevice* SkCanvas::getDevice() const { |
| 592 // return root device | 602 // return root device |
| 593 MCRec* rec = (MCRec*) fMCStack.front(); | 603 MCRec* rec = (MCRec*) fMCStack.front(); |
| 594 SkASSERT(rec && rec->fLayer); | 604 SkASSERT(rec && rec->fLayer); |
| 595 return rec->fLayer->fDevice; | 605 return rec->fLayer->fDevice; |
| 596 } | 606 } |
| (...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2288 return *paint; | 2298 return *paint; |
| 2289 } | 2299 } |
| 2290 | 2300 |
| 2291 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2301 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
| 2292 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2302 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
| 2293 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2303 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
| 2294 | 2304 |
| 2295 /////////////////////////////////////////////////////////////////////////////// | 2305 /////////////////////////////////////////////////////////////////////////////// |
| 2296 | 2306 |
| 2297 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2307 SkCanvas::ClipVisitor::~ClipVisitor() { } |
| OLD | NEW |