| // Copyright 2019 Google LLC. |
| // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| #include "tools/fiddle/examples.h" |
| // HASH=5602b816d7cf75e3851274ef36a4c10f |
| REG_FIDDLE(ImageInfo_colorSpace, 256, 256, true, 0) { |
| void draw(SkCanvas* canvas) { |
| SkImageInfo info = SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType, |
| SkColorSpace::MakeSRGBLinear()); |
| SkColorSpace* colorSpace = info.colorSpace(); |
| SkDebugf("gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\n", |
| colorSpace->gammaCloseToSRGB() ? "true" : "false", |
| colorSpace->gammaIsLinear() ? "true" : "false", |
| colorSpace->isSRGB() ? "true" : "false"); |
| } |
| } // END FIDDLE |