Go to file
Brian Osman e956049450 Fix makeColorSpace on YUV images
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>
2019-02-06 13:45:20 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Rename GrContext::contextPriv to priv 2019-02-04 22:13:14 +00:00
bin bin/sysopen: script moved to bin 2018-12-06 14:21:33 +00:00
dm Rename GrContext::contextPriv to priv 2019-02-04 22:13:14 +00:00
docker CMake: distinguish between file and dir copies by presence of '.' in src path 2019-02-01 18:58:46 +00:00
docs remove mention of SkMetaData 2019-02-05 13:56:25 +00:00
example drawText Cleanup, part 5 2019-01-09 16:10:30 +00:00
experimental [canvaskit] Add SkShaper to build list 2019-01-23 17:04:11 +00:00
fuzz Rename GrContext::contextPriv to priv 2019-02-04 22:13:14 +00:00
gm Fix makeColorSpace on YUV images 2019-02-06 13:45:20 +00:00
gn Revert "third_party/icu: use upstream" 2019-02-06 02:28:30 +00:00
include Revert "templatize drawString" 2019-02-06 11:07:29 +00:00
infra Update go_deps asset 2019-02-06 05:45:19 +00:00
modules [skottie] Fix logging of oversized messages 2019-02-06 00:29:29 +00:00
platform_tools Add support for Windows to the gradle builds 2019-01-08 20:01:29 +00:00
resources [skottie] Add a custom property manager util class 2018-11-28 17:12:07 +00:00
samplecode Convert GrBufferType to enum class, rename, and remove dead values 2019-02-05 15:04:48 +00:00
site Update tracing docs slightly 2019-01-31 19:10:53 +00:00
src Fix makeColorSpace on YUV images 2019-02-06 13:45:20 +00:00
tests Reland "SkSL is now pickier about type conversions" 2019-02-06 02:40:59 +00:00
third_party Revert "third_party/icu: use upstream" 2019-02-06 02:28:30 +00:00
tools s/geTestSVGTypeface/getTestSVGTypeface 2019-02-05 21:38:35 +00:00
.clang-format .clang-format: Don't force break after > in template declarations 2018-12-21 14:20:57 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore Add script to pull svgs to svgs/ and add to .gitignore 2018-08-31 20:02:24 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Update BUILDCONFIG.gn to support Visual Studio 2017 Enterprise 2019-01-09 14:27:34 +00:00
BUILD.gn GN/ICU cleanup 2019-02-05 17:27:55 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll ../src 6c1a9ccaf5f3..c27b32b2fd52 (449 commits) 2019-02-06 10:28:29 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py [presubmit] Remove pylint check 2019-01-14 13:47:51 +00:00
public.bzl [skshaper] Export "primitive" sources in public.bzl 2019-01-21 17:29:33 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt [infra] Marker for IntelBayTrail BIOS update. 2018-09-17 16:47:35 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.