WebManifest: plumb around Optional<SkColor> to represent nullable colors
Rather than plumbing around an int64_t for color, using a magic value to represent an invalid/null color, just use base::Optional. This simplifies the code in a number of ways: - No more magic values - No need to assume that all non-magic int64_t values fit in a uint32_t - No more reinterpret_cast<uint32_t&> The conversion helpers are consolidated into color_helpers.h and shared as well. Bug: 836683 Change-Id: I09ac717f3c852c63680a2c1c561ee8e2fed98777 Reviewed-on: https://chromium-review.googlesource.com/1050994 Commit-Queue: Daniel Cheng <dcheng@chromium.org> Reviewed-by:Nico Weber <thakis@chromium.org> Reviewed-by:
Mounir Lamouri <mlamouri@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#559366}
Showing
This diff is collapsed.
Please register or sign in to comment