Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 9e7e651b1c6e91400e78fa1031fdf1f00cb49110..b6b9cde06ca0d43181f2633b2e7b370f54ef5c34 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -1556,9 +1556,12 @@ bool SampleWindow::onEvent(const SkEvent& evt) { |
return true; |
} |
if (SkOSMenu::FindListIndex(evt, "ColorType", &selected)) { |
- auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ auto colorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ if (kRGBA_F16_SkColorType == gConfig[selected].fColorType) { |
+ colorSpace = colorSpace->makeLinearGamma(); |
+ } |
this->setDeviceColorType(gConfig[selected].fColorType, |
- gConfig[selected].fSRGB ? srgbColorSpace : nullptr); |
+ gConfig[selected].fSRGB ? colorSpace : nullptr); |
return true; |
} |
if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) { |