From f941280ab8c8d2f984dabbd2b1b99c2d5ea1cd6c Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Fri, 2 Dec 2016 12:07:17 -0500 Subject: Fix textblobrandomfont GM in F16 configs We were trying to mix the canvas' color space (linear gamma) with N32 color type, which isn't allowed. Propagate the original color type, too. BUG=skia: Change-Id: I606b25e690486abe042d6a4b6dda606ac85b546b Reviewed-on: https://skia-review.googlesource.com/5509 Commit-Queue: Brian Osman Reviewed-by: Brian Salomon --- gm/textblobrandomfont.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gm/textblobrandomfont.cpp') diff --git a/gm/textblobrandomfont.cpp b/gm/textblobrandomfont.cpp index a2e46972b4..64e2c67233 100644 --- a/gm/textblobrandomfont.cpp +++ b/gm/textblobrandomfont.cpp @@ -97,8 +97,9 @@ protected: canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE)); - SkImageInfo info = SkImageInfo::MakeN32(kWidth, kHeight, kPremul_SkAlphaType, - sk_ref_sp(canvas->imageInfo().colorSpace())); + SkImageInfo info = SkImageInfo::Make(kWidth, kHeight, canvas->imageInfo().colorType(), + kPremul_SkAlphaType, + sk_ref_sp(canvas->imageInfo().colorSpace())); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); auto surface(canvas->makeSurface(info, &props)); if (surface) { -- cgit v1.2.3