aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/codec
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-07-21 11:57:49 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-21 11:57:49 -0700
commit530c844d25340eb2f2a4500c99c3f9d04a95b66e (patch)
tree2d910c86ca3c49f04facead73a1085fa0dbe0f17 /include/codec
parenta95220d3b8deaec22a4706cd3030dd9a8454aeb9 (diff)
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
Diffstat (limited to 'include/codec')
-rw-r--r--include/codec/SkCodec.h8
-rw-r--r--include/codec/SkEncodedInfo.h4
2 files changed, 2 insertions, 10 deletions
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<SkStream> fStream;
bool fNeedsRewind;
- sk_sp<SkColorSpace> 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<SkColorSpace>& colorSpace) const {
+ SkImageInfo makeImageInfo(int width, int height, sk_sp<SkColorSpace> 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();