Lots of progress on switching to SkColorSpace rather than SkColorProfileType
Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
Review-Url: https://codereview.chromium.org/2069173002
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index a894f98..2759a3e 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -213,7 +213,7 @@
SkColorType ct = origInfo.colorType();
SkAlphaType at = origInfo.alphaType();
- SkColorProfileType pt = origInfo.profileType();
+ SkColorSpace* cs = origInfo.colorSpace();
if (kRGB_565_SkColorType == ct || kGray_8_SkColorType == ct) {
at = kOpaque_SkAlphaType; // force this setting
}
@@ -221,13 +221,13 @@
at = kPremul_SkAlphaType; // force this setting
}
- GrPixelConfig origConfig = SkImageInfo2GrPixelConfig(ct, at, pt, *context->caps());
+ GrPixelConfig origConfig = SkImageInfo2GrPixelConfig(ct, at, cs, *context->caps());
if (!context->caps()->isConfigRenderable(origConfig, sampleCount > 0)) {
// Fall back from whatever ct was to default of kRGBA or kBGRA which is aliased as kN32
ct = kN32_SkColorType;
}
- GrPixelConfig config = SkImageInfo2GrPixelConfig(ct, at, pt, *context->caps());
+ GrPixelConfig config = SkImageInfo2GrPixelConfig(ct, at, cs, *context->caps());
return context->newDrawContext(SkBackingFit::kExact, // Why exact?
origInfo.width(), origInfo.height(),