Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: tools/viewer/Viewer.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skiaserve/Request.cpp ('k') | tools/viewer/sk_app/DisplayParams.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/Viewer.cpp
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 40b0e4e2786c990da7da81b8193aed7b604fc06d..7052a3ac79244d7ee724ea9f23a900e675ef2b64 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -121,8 +121,8 @@
});
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();
@@ -257,9 +257,7 @@
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]);
« no previous file with comments | « tools/skiaserve/Request.cpp ('k') | tools/viewer/sk_app/DisplayParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698