aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/readpixels.cpp
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-02-07 17:06:09 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-07 17:06:24 +0000
commit1f2fff2544a9dc6a0f169a017d374eca9f04c6b5 (patch)
treee97779c04ea0d2059cbd6291de3cbfbf27c1cc61 /gm/readpixels.cpp
parentecaaf6f1c156e5690200322fc2636380c1f63dd8 (diff)
Revert "SkColorSpace: remove named API, add gamut API"
This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'gm/readpixels.cpp')
-rw-r--r--gm/readpixels.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gm/readpixels.cpp b/gm/readpixels.cpp
index ad9bf8d4f4..df7fb0751a 100644
--- a/gm/readpixels.cpp
+++ b/gm/readpixels.cpp
@@ -86,7 +86,7 @@ static sk_sp<SkImage> make_tagged_picture_image() {
return SkImage::MakeFromPicture(recorder.finishRecordingAsPicture(),
SkISize::Make(kWidth, kHeight), nullptr, nullptr,
SkImage::BitDepth::kU8,
- SkColorSpace::MakeSRGB());
+ SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named));
}
static sk_sp<SkImage> make_untagged_picture_image() {
@@ -144,7 +144,7 @@ static void draw_image(SkCanvas* canvas, SkImage* image, SkColorType dstColorTyp
// Now that we have called readPixels(), dump the raw pixels into an srgb image.
sk_sp<SkColorSpace> srgb = fix_for_colortype(
- SkColorSpace::MakeSRGB().get(), dstColorType);
+ SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named).get(), dstColorType);
sk_sp<SkImage> raw = SkImage::MakeRasterData(dstInfo.makeColorSpace(srgb), data, rowBytes);
canvas->drawImage(raw.get(), 0.0f, 0.0f, nullptr);
}
@@ -179,7 +179,7 @@ protected:
};
const sk_sp<SkColorSpace> colorSpaces[] = {
make_wide_gamut(),
- SkColorSpace::MakeSRGB(),
+ SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named),
make_small_gamut(),
};
@@ -237,7 +237,7 @@ protected:
};
const sk_sp<SkColorSpace> colorSpaces[] = {
make_wide_gamut(),
- SkColorSpace::MakeSRGB(),
+ SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named),
make_small_gamut(),
};
const SkImage::CachingHint hints[] = {
@@ -304,7 +304,7 @@ protected:
};
const sk_sp<SkColorSpace> colorSpaces[] = {
make_wide_gamut(),
- SkColorSpace::MakeSRGB(),
+ SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named),
make_small_gamut(),
};
const SkImage::CachingHint hints[] = {