diff options
author | Brian Osman <brianosman@google.com> | 2016-12-02 12:07:17 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-02 18:01:02 +0000 |
commit | f941280ab8c8d2f984dabbd2b1b99c2d5ea1cd6c (patch) | |
tree | 6eef69e3aba6d1ba3c186533d19d0b313d9ceb35 | |
parent | b91cf1c3c0935d77e54678e5139b25931c68df06 (diff) |
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 <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
-rw-r--r-- | gm/textblobrandomfont.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |