diff options
author | Florin Malita <fmalita@chromium.org> | 2017-07-13 15:51:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-13 22:31:52 +0000 |
commit | f264e996838dffd28a5a733d8d804142125944e6 (patch) | |
tree | 24712712226d3b6a6b08aa6fd0d8b9ce922c292e | |
parent | b295573c93e7a9a78ee736a399c256d7669b79be (diff) |
Delete unread SkPicture mbox
No longer read?!
Change-Id: I6258a64590bb5ee16e02a7ad923ad41cc7bd8791
Reviewed-on: https://skia-review.googlesource.com/23043
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
-rw-r--r-- | include/core/SkPicture.h | 5 | ||||
-rw-r--r-- | src/core/SkPicture.cpp | 14 |
2 files changed, 0 insertions, 19 deletions
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<SkPicture::DeletionMessage>::Post(msg); - } -} - uint32_t SkPicture::uniqueID() const { static uint32_t gNextID = 1; uint32_t id = sk_atomic_load(&fUniqueID, sk_memory_order_relaxed); |