| Index: tools/render_pictures_main.cpp
|
| diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
|
| index 16963dd3cf717478816e13ddb8e1a04ed48a8a73..01861c72854aa2e879e63ff4d831ba6005ad0a5a 100644
|
| --- a/tools/render_pictures_main.cpp
|
| +++ b/tools/render_pictures_main.cpp
|
| @@ -62,24 +62,24 @@ DEFINE_bool(validate, false, "Verify that the rendered image contains the same p
|
| * Table for translating from format of data to a suffix.
|
| */
|
| struct Format {
|
| - SkImageDecoder::Format fFormat;
|
| - const char* fSuffix;
|
| + SkEncodedFormat fFormat;
|
| + const char* fSuffix;
|
| };
|
| static const Format gFormats[] = {
|
| - { SkImageDecoder::kBMP_Format, ".bmp" },
|
| - { SkImageDecoder::kGIF_Format, ".gif" },
|
| - { SkImageDecoder::kICO_Format, ".ico" },
|
| - { SkImageDecoder::kJPEG_Format, ".jpg" },
|
| - { SkImageDecoder::kPNG_Format, ".png" },
|
| - { SkImageDecoder::kWBMP_Format, ".wbmp" },
|
| - { SkImageDecoder::kWEBP_Format, ".webp" },
|
| - { SkImageDecoder::kUnknown_Format, "" },
|
| + { kBMP_SkEncodedFormat, ".bmp" },
|
| + { kGIF_SkEncodedFormat, ".gif" },
|
| + { kICO_SkEncodedFormat, ".ico" },
|
| + { kJPEG_SkEncodedFormat, ".jpg" },
|
| + { kPNG_SkEncodedFormat, ".png" },
|
| + { kWBMP_SkEncodedFormat, ".wbmp" },
|
| + { kWEBP_SkEncodedFormat, ".webp" },
|
| + { kUnknown_SkEncodedFormat, "" },
|
| };
|
|
|
| /**
|
| * Get an appropriate suffix for an image format.
|
| */
|
| -static const char* get_suffix_from_format(SkImageDecoder::Format format) {
|
| +static const char* get_suffix_from_format(SkEncodedFormat format) {
|
| for (size_t i = 0; i < SK_ARRAY_COUNT(gFormats); i++) {
|
| if (gFormats[i].fFormat == format) {
|
| return gFormats[i].fSuffix;
|
| @@ -124,7 +124,7 @@ static bool write_image_to_file(const void* buffer, size_t size, SkBitmap* bitma
|
| SkASSERT(!FLAGS_writePath.isEmpty());
|
| SkMemoryStream memStream(buffer, size);
|
| SkString outPath;
|
| - SkImageDecoder::Format format = SkImageDecoder::GetStreamFormat(&memStream);
|
| + SkEncodedFormat format = SkImageDecoder::GetStreamFormat(&memStream);
|
| SkString name = SkStringPrintf("%s_%d%s", gInputFileName.c_str(), gImageNo++,
|
| get_suffix_from_format(format));
|
| SkString dir(FLAGS_writePath[0]);
|
|
|