From 7a307df926da2afbdadfb36250925c7f76e3493a Mon Sep 17 00:00:00 2001 From: yujieqin Date: Fri, 11 Mar 2016 07:32:33 -0800 Subject: [PATCH] Rename the kRAW_SkEncodedFormat to kDNG_SkEncodedFormat as it is actually only used for DNG format BUG=b/27587823 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782913002 Review URL: https://codereview.chromium.org/1782913002 --- dm/DM.cpp | 2 +- include/codec/SkEncodedFormat.h | 2 +- src/codec/SkAndroidCodec.cpp | 2 +- src/codec/SkRawCodec.h | 2 +- tools/get_images_from_skps.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dm/DM.cpp b/dm/DM.cpp index f70d19e0ae..ebe37ae602 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -485,7 +485,7 @@ static void push_codec_srcs(Path path) { case SkEncodedFormat::kWEBP_SkEncodedFormat: nativeModes.push_back(CodecSrc::kSubset_Mode); break; - case SkEncodedFormat::kRAW_SkEncodedFormat: + case SkEncodedFormat::kDNG_SkEncodedFormat: break; default: nativeModes.push_back(CodecSrc::kScanline_Mode); diff --git a/include/codec/SkEncodedFormat.h b/include/codec/SkEncodedFormat.h index 275dde608e..c097e088f2 100644 --- a/include/codec/SkEncodedFormat.h +++ b/include/codec/SkEncodedFormat.h @@ -23,6 +23,6 @@ enum SkEncodedFormat { kPKM_SkEncodedFormat, kKTX_SkEncodedFormat, kASTC_SkEncodedFormat, - kRAW_SkEncodedFormat, + kDNG_SkEncodedFormat, }; #endif // SkEncodedFormat_DEFINED diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp index 7dfd64de75..6c3efe095a 100644 --- a/src/codec/SkAndroidCodec.cpp +++ b/src/codec/SkAndroidCodec.cpp @@ -47,7 +47,7 @@ SkAndroidCodec* SkAndroidCodec::NewFromStream(SkStream* stream, SkPngChunkReader return new SkWebpAdapterCodec((SkWebpCodec*) codec.detach()); #endif #ifdef SK_CODEC_DECODES_RAW - case kRAW_SkEncodedFormat: + case kDNG_SkEncodedFormat: return new SkRawAdapterCodec((SkRawCodec*)codec.detach()); #endif default: diff --git a/src/codec/SkRawCodec.h b/src/codec/SkRawCodec.h index e091c97d3f..3ca7b9c17e 100644 --- a/src/codec/SkRawCodec.h +++ b/src/codec/SkRawCodec.h @@ -38,7 +38,7 @@ protected: SkPMColor*, int*, int*) override; SkEncodedFormat onGetEncodedFormat() const override { - return kRAW_SkEncodedFormat; + return kDNG_SkEncodedFormat; } SkISize onGetScaledDimensions(float desiredScale) const override; diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp index 64b39b0682..7d0854d4d4 100644 --- a/tools/get_images_from_skps.cpp +++ b/tools/get_images_from_skps.cpp @@ -50,7 +50,7 @@ struct Sniffer : public SkPixelSerializer { case SkEncodedFormat::kICO_SkEncodedFormat: ext = "ico"; break; case SkEncodedFormat::kJPEG_SkEncodedFormat: ext = "jpg"; break; case SkEncodedFormat::kPNG_SkEncodedFormat: ext = "png"; break; - case SkEncodedFormat::kRAW_SkEncodedFormat: ext = "dng"; break; + case SkEncodedFormat::kDNG_SkEncodedFormat: ext = "dng"; break; case SkEncodedFormat::kWBMP_SkEncodedFormat: ext = "wbmp"; break; case SkEncodedFormat::kWEBP_SkEncodedFormat: ext = "webp"; break; default: gUnknown++; return;