Commit f9e2b22c authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Skia color space fuzzer: mix input and output color transform formats

The fuzzer color transform had the same input and output pixel color
format in each run. In this change, create a mix of input and output
color formats to add extra fuzz.

Tbr: mmoroz@chromium.org
Bug: 708016
Change-Id: I520eafad1959ae2d8688b156e24006718aaf4b0c
Reviewed-on: https://chromium-review.googlesource.com/572890Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487026}
parent 1bd7abc4
...@@ -37,10 +37,11 @@ static void ColorTransform(size_t hash, bool input) { ...@@ -37,10 +37,11 @@ static void ColorTransform(size_t hash, bool input) {
static uint32_t output[kPixels * 4]; static uint32_t output[kPixels * 4];
const auto color = SkColorSpaceXform::ColorFormat(hash & 7); const auto form1 = SkColorSpaceXform::ColorFormat(hash >> 0 & 7);
const auto alpha = SkAlphaType(hash >> 3 & 3); const auto form2 = SkColorSpaceXform::ColorFormat(hash >> 3 & 7);
const auto alpha = SkAlphaType(hash >> 6 & 3);
transform->apply(color, output, color, pixels, kPixels, alpha); transform->apply(form1, output, form2, pixels, kPixels, alpha);
} }
static sk_sp<SkColorSpace> SelectProfile(size_t hash) { static sk_sp<SkColorSpace> SelectProfile(size_t hash) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment