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:
parent
43c2526665
commit
65820db5e1
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user