From 919cc4562cc615c7f4b4325def1f7454bc8dd724 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Sat, 18 Mar 2017 15:36:52 +0000 Subject: Revert "Revert "Add color spin test for SkColorSpaceXformCanvas"" This reverts commit 73e21af21390c2806eb1350253233903808edd6b. Reason for revert: I will fix the broken bot next week. Original change's description: > Revert "Add color spin test for SkColorSpaceXformCanvas" > > This reverts commit cb01aec63bcb3dee52afcf3605bcd64166b873c0. > > Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE > > Original change's description: > > Add color spin test for SkColorSpaceXformCanvas > > > > Also changes behavior to treat nullptr srcs as sRGB. > > > > Testing locally, it looks like 353 gms have no diffs from 8888. > > There are 269 diffs - some are fine (gms that do color space stuff) > > and some are bugs. > > > > BUG=skia: > > > > Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492 > > Reviewed-on: https://skia-review.googlesource.com/9738 > > Reviewed-by: Brian Osman > > Commit-Queue: Matt Sarett > > > > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org > # Not skipping CQ checks because original CL landed > 1 day ago. > BUG=skia: > > Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c > Reviewed-on: https://skia-review.googlesource.com/9823 > Reviewed-by: Eric Boren > Commit-Queue: Eric Boren > TBR=borenet@google.com,mtklein@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I766382e6655f614042cded84f547f9fd5b109fca Reviewed-on: https://skia-review.googlesource.com/9879 Reviewed-by: Mike Klein Commit-Queue: Mike Klein --- gm/imagemasksubset.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gm/imagemasksubset.cpp') diff --git a/gm/imagemasksubset.cpp b/gm/imagemasksubset.cpp index 80282787da..2d0d12038c 100644 --- a/gm/imagemasksubset.cpp +++ b/gm/imagemasksubset.cpp @@ -34,7 +34,12 @@ public: return false; } - make_mask(SkSurface::MakeRasterDirect(info, pixels, rowBytes)); + SkImageInfo surfaceInfo = info; + if (kAlpha_8_SkColorType == info.colorType()) { + surfaceInfo = surfaceInfo.makeColorSpace(nullptr); + } + + make_mask(SkSurface::MakeRasterDirect(surfaceInfo, pixels, rowBytes)); return true; } -- cgit v1.2.3