diff options
author | reed <reed@google.com> | 2015-07-09 11:47:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-09 11:47:36 -0700 |
commit | 1c84634454aa78fb26f23875b86a243aa4596c59 (patch) | |
tree | ced1b33e730a196a7ad6fb9721543af9b62f3565 /src/ports | |
parent | 3547505278f5f9fe9602ec767c20d461f7a5dab6 (diff) |
add runtime option to provide data->imagegenerator factory
BUG=skia:
Review URL: https://codereview.chromium.org/1229933003
Diffstat (limited to 'src/ports')
-rw-r--r-- | src/ports/SkImageGenerator_none.cpp | 2 | ||||
-rw-r--r-- | src/ports/SkImageGenerator_skia.cpp | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/ports/SkImageGenerator_none.cpp b/src/ports/SkImageGenerator_none.cpp index 78d408aa35..c0126cae79 100644 --- a/src/ports/SkImageGenerator_none.cpp +++ b/src/ports/SkImageGenerator_none.cpp @@ -7,6 +7,6 @@ #include "SkImageGenerator.h" -SkImageGenerator* SkImageGenerator::NewFromData(SkData*) { +SkImageGenerator* SkImageGenerator::NewFromEncodedImpl(SkData*) { return NULL; } diff --git a/src/ports/SkImageGenerator_skia.cpp b/src/ports/SkImageGenerator_skia.cpp index f972253306..1dbc9a5f33 100644 --- a/src/ports/SkImageGenerator_skia.cpp +++ b/src/ports/SkImageGenerator_skia.cpp @@ -108,11 +108,7 @@ private: typedef SkImageGenerator INHERITED; }; -SkImageGenerator* SkImageGenerator::NewFromData(SkData* data) { - if (NULL == data) { - return NULL; - } - +SkImageGenerator* SkImageGenerator::NewFromEncodedImpl(SkData* data) { SkMemoryStream stream(data->data(), data->size(), false); SkImageDecoder* decoder = SkImageDecoder::Factory(&stream); if (NULL == decoder) { |