| Index: tools/viewer/Viewer.cpp
|
| diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
|
| index 7052a3ac79244d7ee724ea9f23a900e675ef2b64..40b0e4e2786c990da7da81b8193aed7b604fc06d 100644
|
| --- a/tools/viewer/Viewer.cpp
|
| +++ b/tools/viewer/Viewer.cpp
|
| @@ -121,8 +121,8 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
|
| });
|
| fCommands.addCommand('c', "Modes", "Toggle sRGB color mode", [this]() {
|
| DisplayParams params = fWindow->getDisplayParams();
|
| - params.fProfileType = (kLinear_SkColorProfileType == params.fProfileType)
|
| - ? kSRGB_SkColorProfileType : kLinear_SkColorProfileType;
|
| + params.fColorSpace = (nullptr == params.fColorSpace)
|
| + ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : nullptr;
|
| fWindow->setDisplayParams(params);
|
| this->updateTitle();
|
| fWindow->inval();
|
| @@ -257,7 +257,9 @@ Viewer::~Viewer() {
|
| void Viewer::updateTitle() {
|
| SkString title("Viewer: ");
|
| title.append(fSlides[fCurrentSlide]->getName());
|
| - if (kSRGB_SkColorProfileType == fWindow->getDisplayParams().fProfileType) {
|
| +
|
| + // TODO: For now, any color-space on the window means sRGB
|
| + if (fWindow->getDisplayParams().fColorSpace) {
|
| title.append(" sRGB");
|
| }
|
| title.append(kBackendTypeStrings[fBackendType]);
|
|
|