diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 1a46da5831..bd4dc9a7de 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -37,8 +37,6 @@ struct SkPictInfo; */ class SK_API SkPicture : public SkRefCnt { public: - virtual ~SkPicture(); - /** * Function signature defining a function that sets up an SkBitmap from encoded data. On * success, the SkBitmap should have its Config, width, height, rowBytes and pixelref set. @@ -157,9 +155,6 @@ public: bool suitableForGpuRasterization(GrContext*, const char** whyNot = NULL) const; #endif - // Sent via SkMessageBus from destructor. - struct DeletionMessage { int32_t fUniqueID; }; // TODO: -> uint32_t? - // Returns NULL if this is not an SkBigPicture. virtual const SkBigPicture* asSkBigPicture() const { return NULL; } diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 039efc85c7..972b81f997 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -8,7 +8,6 @@ #include "SkAtomics.h" #include "SkImageDeserializer.h" #include "SkImageGenerator.h" -#include "SkMessageBus.h" #include "SkPicture.h" #include "SkPictureData.h" #include "SkPicturePlayback.h" @@ -22,23 +21,10 @@ static bool g_AllPictureIOSecurityPrecautionsEnabled = true; static bool g_AllPictureIOSecurityPrecautionsEnabled = false; #endif -DECLARE_SKMESSAGEBUS_MESSAGE(SkPicture::DeletionMessage); - /* SkPicture impl. This handles generic responsibilities like unique IDs and serialization. */ SkPicture::SkPicture() : fUniqueID(0) {} -SkPicture::~SkPicture() { - // TODO: move this to ~SkBigPicture() only? - - // If the ID is still zero, no one has read it, so no need to send this message. - uint32_t id = sk_atomic_load(&fUniqueID, sk_memory_order_relaxed); - if (id != 0) { - SkPicture::DeletionMessage msg = { (int32_t)id }; - SkMessageBus::Post(msg); - } -} - uint32_t SkPicture::uniqueID() const { static uint32_t gNextID = 1; uint32_t id = sk_atomic_load(&fUniqueID, sk_memory_order_relaxed);