| Index: samplecode/SampleApp.cpp
|
| diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
|
| index e639433421fc48c716b271bab3035eb922b072e0..971044cf87250985055777b54ec993c546d3f28b 100644
|
| --- a/samplecode/SampleApp.cpp
|
| +++ b/samplecode/SampleApp.cpp
|
| @@ -48,18 +48,17 @@
|
|
|
| const struct {
|
| SkColorType fColorType;
|
| - bool fSRGB;
|
| + SkColorProfileType fProfileType;
|
| const char* fName;
|
| } gConfig[] = {
|
| - { kN32_SkColorType, false, "L32" },
|
| - { kN32_SkColorType, true, "S32" },
|
| - { kRGBA_F16_SkColorType, false, "F16" },
|
| + { kN32_SkColorType, kLinear_SkColorProfileType, "L32" },
|
| + { kN32_SkColorType, kSRGB_SkColorProfileType, "S32" },
|
| + { kRGBA_F16_SkColorType, kLinear_SkColorProfileType, "F16" },
|
| };
|
|
|
| static const char* find_config_name(const SkImageInfo& info) {
|
| for (const auto& config : gConfig) {
|
| - if (config.fColorType == info.colorType() &&
|
| - config.fSRGB == (info.colorSpace() != nullptr)) {
|
| + if (config.fColorType == info.colorType() && config.fProfileType == info.profileType()) {
|
| return config.fName;
|
| }
|
| }
|
| @@ -1636,9 +1635,7 @@
|
| return true;
|
| }
|
| if (SkOSMenu::FindListIndex(evt, "ColorType", &selected)) {
|
| - auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
|
| - this->setDeviceColorType(gConfig[selected].fColorType,
|
| - gConfig[selected].fSRGB ? srgbColorSpace : nullptr);
|
| + this->setDeviceColorType(gConfig[selected].fColorType, gConfig[selected].fProfileType);
|
| return true;
|
| }
|
| if (SkOSMenu::FindSwitchState(evt, "Slide Show", nullptr)) {
|
| @@ -1853,8 +1850,8 @@
|
| this->inval(nullptr);
|
| }
|
|
|
| -void SampleWindow::setDeviceColorType(SkColorType ct, sk_sp<SkColorSpace> cs) {
|
| - this->setColorType(ct, std::move(cs));
|
| +void SampleWindow::setDeviceColorType(SkColorType ct, SkColorProfileType pt) {
|
| + this->setColorType(ct, pt);
|
|
|
| fDevManager->tearDownBackend(this);
|
| fDevManager->setUpBackend(this, fMSAASampleCount, fDeepColor);
|
|
|