Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 0c70f008f953b68ac6cd4ad538adc5e10ac6e5a9..a4fb531dc345d35e2f115b74f6433c3b94ed0457 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -1325,44 +1325,6 @@ protected: |
sk_sp<SkLights> fLights; |
#endif |
- /** After calling saveLayer(), there can be any number of devices that make |
- up the top-most drawing area. LayerIter can be used to iterate through |
- those devices. Note that the iterator is only valid until the next API |
- call made on the canvas. Ownership of all pointers in the iterator stays |
- with the canvas, so none of them should be modified or deleted. |
- */ |
- class LayerIter /*: SkNoncopyable*/ { |
- public: |
- /** Initialize iterator with canvas, and set values for 1st device */ |
- LayerIter(SkCanvas*, bool skipEmptyClips); |
- ~LayerIter(); |
- |
- /** Return true if the iterator is done */ |
- bool done() const { return fDone; } |
- /** Cycle to the next device */ |
- void next(); |
- |
- // These reflect the current device in the iterator |
- |
- SkBaseDevice* device() const; |
- const SkMatrix& matrix() const; |
- const SkRasterClip& clip() const; |
- const SkPaint& paint() const; |
- int x() const; |
- int y() const; |
- |
- private: |
- // used to embed the SkDrawIter object directly in our instance, w/o |
- // having to expose that class def to the public. There is an assert |
- // in our constructor to ensure that fStorage is large enough |
- // (though needs to be a compile-time-assert!). We use intptr_t to work |
- // safely with 32 and 64 bit machines (to ensure the storage is enough) |
- intptr_t fStorage[32]; |
- class SkDrawIter* fImpl; // this points at fStorage |
- SkPaint fDefaultPaint; |
- bool fDone; |
- }; |
- |
// default impl defers to getDevice()->newSurface(info) |
virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&); |
@@ -1484,6 +1446,44 @@ protected: |
const SkImageFilter* imageFilter = NULL); |
private: |
+ /** After calling saveLayer(), there can be any number of devices that make |
+ up the top-most drawing area. LayerIter can be used to iterate through |
+ those devices. Note that the iterator is only valid until the next API |
+ call made on the canvas. Ownership of all pointers in the iterator stays |
+ with the canvas, so none of them should be modified or deleted. |
+ */ |
+ class LayerIter /*: SkNoncopyable*/ { |
+ public: |
+ /** Initialize iterator with canvas, and set values for 1st device */ |
+ LayerIter(SkCanvas*); |
+ ~LayerIter(); |
+ |
+ /** Return true if the iterator is done */ |
+ bool done() const { return fDone; } |
+ /** Cycle to the next device */ |
+ void next(); |
+ |
+ // These reflect the current device in the iterator |
+ |
+ SkBaseDevice* device() const; |
+ const SkMatrix& matrix() const; |
+ const SkRasterClip& clip() const; |
+ const SkPaint& paint() const; |
+ int x() const; |
+ int y() const; |
+ |
+ private: |
+ // used to embed the SkDrawIter object directly in our instance, w/o |
+ // having to expose that class def to the public. There is an assert |
+ // in our constructor to ensure that fStorage is large enough |
+ // (though needs to be a compile-time-assert!). We use intptr_t to work |
+ // safely with 32 and 64 bit machines (to ensure the storage is enough) |
+ intptr_t fStorage[32]; |
+ class SkDrawIter* fImpl; // this points at fStorage |
+ SkPaint fDefaultPaint; |
+ bool fDone; |
+ }; |
+ |
static bool BoundsAffectsClip(SaveLayerFlags); |
static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFlags); |
@@ -1542,7 +1542,6 @@ private: |
void checkForDeferredSave(); |
void internalSetMatrix(const SkMatrix&); |
- friend class CanvasTestingAccess; // for testing |
friend class SkDrawIter; // needs setupDrawForLayerDevice() |
friend class AutoDrawLooper; |
friend class SkLua; // needs top layer size and offset |