aboutsummaryrefslogtreecommitdiff
path: root/tests/PictureTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PictureTest.cpp')
-rw-r--r--tests/PictureTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 425b25a153..4f76c6a829 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -102,6 +102,7 @@ public:
: INHERITED(width, height)
, fSaveCount(0)
, fSaveLayerCount(0)
+ , fSaveBehindCount(0)
, fRestoreCount(0){
}
@@ -110,6 +111,11 @@ public:
return this->INHERITED::getSaveLayerStrategy(rec);
}
+ bool onDoSaveBehind(const SkRect* subset) override {
+ ++fSaveBehindCount;
+ return this->INHERITED::onDoSaveBehind(subset);
+ }
+
void willSave() override {
++fSaveCount;
this->INHERITED::willSave();
@@ -122,11 +128,13 @@ public:
unsigned int getSaveCount() const { return fSaveCount; }
unsigned int getSaveLayerCount() const { return fSaveLayerCount; }
+ unsigned int getSaveBehindCount() const { return fSaveBehindCount; }
unsigned int getRestoreCount() const { return fRestoreCount; }
private:
unsigned int fSaveCount;
unsigned int fSaveLayerCount;
+ unsigned int fSaveBehindCount;
unsigned int fRestoreCount;
typedef SkCanvas INHERITED;