From 530c844d25340eb2f2a4500c99c3f9d04a95b66e Mon Sep 17 00:00:00 2001 From: msarett Date: Thu, 21 Jul 2016 11:57:49 -0700 Subject: Remove unnecessary getColorSpace() API from SkCodec Not needed since now we can get it from the SkImageInfo. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2170793004 Review-Url: https://codereview.chromium.org/2170793004 --- include/codec/SkCodec.h | 8 -------- include/codec/SkEncodedInfo.h | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'include/codec') diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index 293068c2de..5c84e07c70 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -109,13 +109,6 @@ public: const SkEncodedInfo& getEncodedInfo() const { return fEncodedInfo; } - /** - * Returns the color space associated with the codec. - * Does not affect ownership. - * Might be NULL. - */ - SkColorSpace* getColorSpace() const { return fColorSpace.get(); } - enum Origin { kTopLeft_Origin = 1, // Default kTopRight_Origin = 2, // Reflected across y-axis @@ -662,7 +655,6 @@ private: const SkImageInfo fSrcInfo; SkAutoTDelete fStream; bool fNeedsRewind; - sk_sp fColorSpace; const Origin fOrigin; // These fields are only meaningful during scanline decodes. diff --git a/include/codec/SkEncodedInfo.h b/include/codec/SkEncodedInfo.h index 60ad588edd..eb8c147a3b 100644 --- a/include/codec/SkEncodedInfo.h +++ b/include/codec/SkEncodedInfo.h @@ -117,7 +117,7 @@ public: * Returns an SkImageInfo with Skia color and alpha types that are the * closest possible match to the encoded info. */ - SkImageInfo makeImageInfo(int width, int height, const sk_sp& colorSpace) const { + SkImageInfo makeImageInfo(int width, int height, sk_sp colorSpace) const { switch (fColor) { case kGray_Color: SkASSERT(kOpaque_Alpha == fAlpha); @@ -147,7 +147,7 @@ public: case kYUVA_Color: SkASSERT(kOpaque_Alpha != fAlpha); return SkImageInfo::Make(width, height, kN32_SkColorType, - kUnpremul_SkAlphaType, colorSpace); + kUnpremul_SkAlphaType, std::move(colorSpace)); default: SkASSERT(false); return SkImageInfo::MakeUnknown(); -- cgit v1.2.3