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

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

Issue 546493002: remove getTotalClipAsPath, privatize getTotalClip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: namespaces are awesome (not) Created 6 years, 3 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
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | 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 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 } 1675 }
1676 1676
1677 const SkMatrix& SkCanvas::getTotalMatrix() const { 1677 const SkMatrix& SkCanvas::getTotalMatrix() const {
1678 return fMCRec->fMatrix; 1678 return fMCRec->fMatrix;
1679 } 1679 }
1680 1680
1681 const SkRegion& SkCanvas::internal_private_getTotalClip() const { 1681 const SkRegion& SkCanvas::internal_private_getTotalClip() const {
1682 return fMCRec->fRasterClip.forceGetBW(); 1682 return fMCRec->fRasterClip.forceGetBW();
1683 } 1683 }
1684 1684
1685 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const {
1686 path->reset();
1687
1688 const SkRegion& rgn = fMCRec->fRasterClip.forceGetBW();
1689 if (rgn.isEmpty()) {
1690 return;
1691 }
1692 (void)rgn.getBoundaryPath(path);
1693 }
1694
1695 GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() { 1685 GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() {
1696 SkBaseDevice* dev = this->getTopDevice(); 1686 SkBaseDevice* dev = this->getTopDevice();
1697 return dev ? dev->accessRenderTarget() : NULL; 1687 return dev ? dev->accessRenderTarget() : NULL;
1698 } 1688 }
1699 1689
1700 SkBaseDevice* SkCanvas::createLayerDevice(const SkImageInfo& info) { 1690 SkBaseDevice* SkCanvas::createLayerDevice(const SkImageInfo& info) {
1701 SkBaseDevice* device = this->getTopDevice(); 1691 SkBaseDevice* device = this->getTopDevice();
1702 return device ? device->createCompatibleDeviceForSaveLayer(info) : NULL; 1692 return device ? device->createCompatibleDeviceForSaveLayer(info) : NULL;
1703 } 1693 }
1704 1694
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 } 2562 }
2573 2563
2574 if (NULL != matrix) { 2564 if (NULL != matrix) {
2575 canvas->concat(*matrix); 2565 canvas->concat(*matrix);
2576 } 2566 }
2577 } 2567 }
2578 2568
2579 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2569 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2580 fCanvas->restoreToCount(fSaveCount); 2570 fCanvas->restoreToCount(fSaveCount);
2581 } 2571 }
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698