e956049450
This is a second attempt at https://skia-review.googlesource.com/c/skia/+/182816 This version ensures that SkImage::colorSpace() returns the target after makeColorSpace has been called (to match user expectations, and match behavior with lazy images). Given that, the xform is baked into the FP within the maker, rather than externally (again, this matches the lazy image behavior). Additionally, the target color space needs to be taken into account when flattening into the RGB proxy, and some base-class methods need to use this->colorSpace() rather than fColorSpace to tag the output. Added a GM that tests quite a few different scenarios. All images have makeColorSpace() applied: - Raster image (for reference) - yuvImage - yuvImage->makeSubset() - yuvImage->makeNonTextureImage() - readPixels(yuvImage) All images should look the same as the top row. Verified that they do match, in both untagged (gl) and tagged (glsrgb) configs. I think there may still be some cases where we transform too many or too few times, or incorrectly tag the result of an image operation, but this is much more correct than before, and should (I hope) address Chrome's immediate needs. Bug: skia:8740 Change-Id: I5d501879866861a5ba91240f688d3f95711f7595 Reviewed-on: https://skia-review.googlesource.com/c/189494 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
dm | ||
docker | ||
docs | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
Doxyfile | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.