Index: gm/textblobmixedsizes.cpp |
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp |
index 82a0dbbd2aac392f158c39b6630ad21b5010c6c2..6041e521fdf0f2646bc4a6421c3bed183b7b48c8 100644 |
--- a/gm/textblobmixedsizes.cpp |
+++ b/gm/textblobmixedsizes.cpp |
@@ -103,8 +103,12 @@ protected: |
#if SK_SUPPORT_GPU |
// Create a new Canvas to enable DFT |
GrContext* ctx = inputCanvas->getGrContext(); |
- SkImageInfo info = SkImageInfo::MakeN32Premul(onISize()); |
- SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag, |
+ SkImageInfo info = SkImageInfo::MakeN32Premul(onISize(), |
+ inputCanvas->imageInfo().profileType()); |
+ SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType); |
+ uint32_t allowSRGBInputs = inputCanvas->getProps(&canvasProps) |
+ ? canvasProps.flags() & SkSurfaceProps::kAllowSRGBInputs_Flag : 0; |
+ SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag | allowSRGBInputs, |
SkSurfaceProps::kLegacyFontHost_InitType); |
surface = SkSurface::MakeRenderTarget(ctx, SkBudgeted::kNo, info, 0, &props); |
canvas = surface.get() ? surface->getCanvas() : inputCanvas; |