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

Unified Diff: include/core/SkCanvas.h

Issue 2257203002: make LayerIter private, and remove skipClip option (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead comment Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698