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

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

Issue 181903002: Revert "Revert of Add getReducedClipStack to lua canvas (https://codereview.chromium.org/180283004/… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix no gpu build Created 6 years, 9 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
« no previous file with comments | « include/utils/SkLua.h ('k') | src/core/SkTLList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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() { }
OLDNEW
« no previous file with comments | « include/utils/SkLua.h ('k') | src/core/SkTLList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698