use 'real' SkImageDeserializer
authorMike Reed <reed@google.com>
Thu, 20 Oct 2016 14:39:22 +0000 (10:39 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 20 Oct 2016 15:03:15 +0000 (15:03 +0000)
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3727

Change-Id: Ic07ea6bd2756f1be08e80075c236a70ce6c08a3b
TBR=mtklein
Reviewed-on: https://skia-review.googlesource.com/3727
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

src/core/SkPipe.h
src/pipe/SkPipeReader.cpp

index 739b9bc585bb6e6cb73e39acd5a28d403f55d91b..1418387e3b838e76bd46d82e82b46ccfb3a90125 100644 (file)
@@ -101,11 +101,4 @@ public:
     virtual sk_sp<SkTypeface> deserialize(const void* data, size_t size) = 0;
 };
 
-class SkImageDeserializer {
-public:
-    virtual ~SkImageDeserializer() {}
-
-    virtual sk_sp<SkImage> deserialize(const void*, size_t) = 0;
-};
-
 #endif
index 8fa539e64d431bda99b368bb954706e086ae0fa6..31718e9b36c4a6eaf27af3f78585ce16e1007099 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "SkCanvas.h"
 #include "SkDeduper.h"
+#include "SkImageDeserializer.h"
 #include "SkPicture.h"
 #include "SkPictureRecorder.h"
 #include "SkPipe.h"
@@ -686,7 +687,7 @@ static sk_sp<SkImage> make_from_skiaimageformat(const void* encoded, size_t enco
 
 sk_sp<SkImage> SkPipeInflator::makeImage(const sk_sp<SkData>& data) {
     if (fIMDeserializer) {
-        return fIMDeserializer->deserialize(data->data(), data->size());
+        return fIMDeserializer->makeFromData(data.get(), nullptr);
     }
     sk_sp<SkImage> image = make_from_skiaimageformat(data->data(), data->size());
     if (!image) {