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

Side by Side Diff: include/core/SkCanvas.h

Issue 355193006: stop calling SkCanvas::getDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 * DEPRECATED: call getBaseLayerSize 157 * DEPRECATED: call getBaseLayerSize
158 */ 158 */
159 SkISize getDeviceSize() const { return this->getBaseLayerSize(); } 159 SkISize getDeviceSize() const { return this->getBaseLayerSize(); }
160 160
161 /** 161 /**
162 * DEPRECATED. 162 * DEPRECATED.
163 * Return the canvas' device object, which may be null. The device holds 163 * Return the canvas' device object, which may be null. The device holds
164 * the bitmap of the pixels that the canvas draws into. The reference count 164 * the bitmap of the pixels that the canvas draws into. The reference count
165 * of the returned device is not changed by this call. 165 * of the returned device is not changed by this call.
166 */ 166 */
167 #ifndef SK_SUPPORT_LEGACY_GETDEVICE
168 protected: // Can we make this private?
169 #endif
167 SkBaseDevice* getDevice() const; 170 SkBaseDevice* getDevice() const;
171 public:
168 172
169 /** 173 /**
170 * saveLayer() can create another device (which is later drawn onto 174 * saveLayer() can create another device (which is later drawn onto
171 * the previous device). getTopDevice() returns the top-most device current 175 * the previous device). getTopDevice() returns the top-most device current
172 * installed. Note that this can change on other calls like save/restore, 176 * installed. Note that this can change on other calls like save/restore,
173 * so do not access this device after subsequent canvas calls. 177 * so do not access this device after subsequent canvas calls.
174 * The reference count of the device is not changed. 178 * The reference count of the device is not changed.
175 * 179 *
176 * @param updateMatrixClip If this is true, then before the device is 180 * @param updateMatrixClip If this is true, then before the device is
177 * returned, we ensure that its has been notified about the current 181 * returned, we ensure that its has been notified about the current
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 friend class SkSurface_Gpu; 1286 friend class SkSurface_Gpu;
1283 1287
1284 bool fDeviceCMDirty; // cleared by updateDeviceCMCache() 1288 bool fDeviceCMDirty; // cleared by updateDeviceCMCache()
1285 void updateDeviceCMCache(); 1289 void updateDeviceCMCache();
1286 1290
1287 friend class SkDrawIter; // needs setupDrawForLayerDevice() 1291 friend class SkDrawIter; // needs setupDrawForLayerDevice()
1288 friend class AutoDrawLooper; 1292 friend class AutoDrawLooper;
1289 friend class SkLua; // needs top layer size and offset 1293 friend class SkLua; // needs top layer size and offset
1290 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip 1294 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip
1291 friend class SkDeferredDevice; // needs getTopDevice() 1295 friend class SkDeferredDevice; // needs getTopDevice()
1296 friend class SkSurface_Raster; // needs getDevice()
1292 1297
1293 SkBaseDevice* createLayerDevice(const SkImageInfo&); 1298 SkBaseDevice* createLayerDevice(const SkImageInfo&);
1294 1299
1295 SkBaseDevice* init(SkBaseDevice*); 1300 SkBaseDevice* init(SkBaseDevice*);
1296 1301
1297 /** 1302 /**
1298 * DEPRECATED 1303 * DEPRECATED
1299 * 1304 *
1300 * Specify a device for this canvas to draw into. If it is not null, its 1305 * Specify a device for this canvas to draw into. If it is not null, its
1301 * reference count is incremented. If the canvas was already holding a 1306 * reference count is incremented. If the canvas was already holding a
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1493
1489 class SkCanvasClipVisitor { 1494 class SkCanvasClipVisitor {
1490 public: 1495 public:
1491 virtual ~SkCanvasClipVisitor(); 1496 virtual ~SkCanvasClipVisitor();
1492 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1497 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1493 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1498 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1494 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1499 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1495 }; 1500 };
1496 1501
1497 #endif 1502 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698