aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/viewer/ImageSlide.cpp2
-rw-r--r--tools/visualize_color_gamut.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/viewer/ImageSlide.cpp b/tools/viewer/ImageSlide.cpp
index 3ba6b58460..b0471547bc 100644
--- a/tools/viewer/ImageSlide.cpp
+++ b/tools/viewer/ImageSlide.cpp
@@ -41,7 +41,7 @@ void ImageSlide::load(SkScalar, SkScalar) {
fImage->asLegacyBitmap(&fOriginalBitmap, SkImage::kRO_LegacyBitmapMode);
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded.get()));
- sk_sp<SkColorSpace> srcSpace = sk_ref_sp(codec->getColorSpace());
+ sk_sp<SkColorSpace> srcSpace = sk_ref_sp(codec->getInfo().colorSpace());
sk_sp<SkColorSpace> dstSpace = SkColorSpace::NewNamed(SkColorSpace::kAdobeRGB_Named);
std::unique_ptr<SkColorSpaceXform> xform = SkColorSpaceXform::New(srcSpace, dstSpace);
fOriginalBitmap.deepCopyTo(&fXformedBitmap);
diff --git a/tools/visualize_color_gamut.cpp b/tools/visualize_color_gamut.cpp
index bc40152a44..4d340f8d98 100644
--- a/tools/visualize_color_gamut.cpp
+++ b/tools/visualize_color_gamut.cpp
@@ -151,7 +151,7 @@ int main(int argc, char** argv) {
}
// Draw gamut for the input image.
- sk_sp<SkColorSpace> colorSpace = sk_ref_sp(codec->getColorSpace());
+ sk_sp<SkColorSpace> colorSpace = sk_ref_sp(codec->getInfo().colorSpace());
if (!colorSpace) {
SkDebugf("Image had no embedded color space information. Defaulting to sRGB.\n");
colorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);