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

Unified Diff: include/core/SkPicture.h

Issue 751663002: Remove Picture deletion listeners. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: f Created 6 years, 1 month 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/SkPicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index dedda3e31ddf0e081083d49ad8f771dc6c1bc011..ebaeef0b7ead535a3b304fd9182a75f92bbde389 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -180,14 +180,6 @@ public:
bool suitableForGpuRasterization(GrContext*, const char ** = NULL) const;
#endif
- class DeletionListener : public SkRefCnt {
- public:
- virtual void onDeletion(uint32_t pictureID) = 0;
- };
-
- // Takes ref on listener.
- void addDeletionListener(DeletionListener* listener) const;
-
/** Return the approximate number of operations in this picture. This
* number may be greater or less than the number of SkCanvas calls
* recorded: some calls may be recorded as more than one operation, or some
@@ -212,6 +204,9 @@ public:
int fCount;
};
+ // Sent via SkMessageBus from destructor.
+ struct DeletionMessage { int32_t fUniqueID; };
+
private:
// V2 : adds SkPixelRef's generation ID.
// V3 : PictInfo tag at beginning, and EOF tag at the end
@@ -259,8 +254,6 @@ private:
static const uint32_t MIN_PICTURE_VERSION = 19;
static const uint32_t CURRENT_PICTURE_VERSION = 37;
- void callDeletionListeners();
-
void createHeader(SkPictInfo* info) const;
static bool IsValidPictInfo(const SkPictInfo& info);
@@ -275,7 +268,6 @@ private:
const uint32_t fUniqueID;
const SkRect fCullRect;
mutable SkAutoTUnref<const AccelData> fAccelData;
- mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed
SkAutoTDelete<const SkRecord> fRecord;
SkAutoTUnref<const SkBBoxHierarchy> fBBH;
SkAutoTDelete<const SnapshotArray> fDrawablePicts;
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698