use 'real' SkImageDeserializer

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>
This commit is contained in:
Mike Reed 2016-10-20 10:39:22 -04:00 committed by Skia Commit-Bot
parent 43c2526665
commit 65820db5e1
2 changed files with 2 additions and 8 deletions

View 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

View 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) {