diff options
author | 2016-06-16 11:41:44 -0700 | |
---|---|---|
committer | 2016-06-16 11:41:44 -0700 | |
commit | ab8241880d09eb1774b4993ca6df048a27b7020c (patch) | |
tree | f3c7e4c1873771ee818e0a1c86515a3ea5250d75 /tools/viewer/Viewer.cpp | |
parent | 6a61a875467646f8dbc37cfecf49e12d1f475170 (diff) |
Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ )
Reason for revert:
Mac crashes in GrUploadPixmapToTexture
Original issue's description:
> Lots of progress on switching to SkColorSpace rather than SkColorProfileType
>
> Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
>
> Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170
TBR=reed@google.com,herb@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2072813002
Diffstat (limited to 'tools/viewer/Viewer.cpp')
-rw-r--r-- | tools/viewer/Viewer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 9aec01f3ec..43697f88b8 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -122,8 +122,8 @@ Viewer::Viewer(int argc, char** argv, void* platformData) }); fCommands.addCommand('c', "Modes", "Toggle sRGB color mode", [this]() { DisplayParams params = fWindow->getDisplayParams(); - params.fColorSpace = (nullptr == params.fColorSpace) - ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr; + params.fProfileType = (kLinear_SkColorProfileType == params.fProfileType) + ? kSRGB_SkColorProfileType : kLinear_SkColorProfileType; fWindow->setDisplayParams(params); this->updateTitle(); fWindow->inval(); @@ -266,9 +266,7 @@ Viewer::~Viewer() { void Viewer::updateTitle() { SkString title("Viewer: "); title.append(fSlides[fCurrentSlide]->getName()); - - // TODO: For now, any color-space on the window means sRGB - if (fWindow->getDisplayParams().fColorSpace) { + if (kSRGB_SkColorProfileType == fWindow->getDisplayParams().fProfileType) { title.append(" sRGB"); } title.append(kBackendTypeStrings[fBackendType]); |