diff options
author | brianosman <brianosman@google.com> | 2016-09-28 08:17:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-28 08:17:21 -0700 |
commit | b37eb0e968c5082e021244d4baf9b7721e3f360a (patch) | |
tree | 5b43df391bad0d7aa8a27cb50798855671229066 | |
parent | a343017fc2a1dd3d7aba50f60f2064b787748bb2 (diff) |
Revert of Tag checkerboard bitmaps as sRGB (patchset #1 id:1 of https://codereview.chromium.org/2368933003/ )
Reason for revert:
Regression on displacement GM when sRGB support is lacking.
Original issue's description:
> Tag checkerboard bitmaps as sRGB
>
> Significantly reduces the diff between legacy and sRGB/F16 on about 25
> GMs. This is just the biggest piece of low-hanging fruit. Many GMs create
> N32 raster surfaces to procedurally generate source textures, and I'd like
> to fix all of them. It's much easier to reason about the GMs (is sRGB
> doing the right thing) when everything is tagged like this - the only
> expected differences are due to filtering and blending.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2368933003
>
> Committed: https://skia.googlesource.com/skia/+/fe843cea499ba163d53281425af210b1887d28e7
TBR=mtklein@google.com,reed@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2375063002
-rw-r--r-- | tools/sk_tool_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp index 72d1af5083..0978058238 100644 --- a/tools/sk_tool_utils.cpp +++ b/tools/sk_tool_utils.cpp @@ -200,7 +200,7 @@ void write_pixels(SkCanvas* canvas, const SkBitmap& bitmap, int x, int y, sk_sp<SkShader> create_checkerboard_shader(SkColor c1, SkColor c2, int size) { SkBitmap bm; - bm.allocPixels(SkImageInfo::MakeS32(2 * size, 2 * size, kPremul_SkAlphaType)); + bm.allocN32Pixels(2 * size, 2 * size); bm.eraseColor(c1); bm.eraseArea(SkIRect::MakeLTRB(0, 0, size, size), c2); bm.eraseArea(SkIRect::MakeLTRB(size, size, 2 * size, 2 * size), c2); @@ -210,7 +210,7 @@ sk_sp<SkShader> create_checkerboard_shader(SkColor c1, SkColor c2, int size) { SkBitmap create_checkerboard_bitmap(int w, int h, SkColor c1, SkColor c2, int checkSize) { SkBitmap bitmap; - bitmap.allocPixels(SkImageInfo::MakeS32(w, h, kPremul_SkAlphaType)); + bitmap.allocN32Pixels(w, h); SkCanvas canvas(bitmap); sk_tool_utils::draw_checkerboard(&canvas, c1, c2, checkSize); |