Go to file
Leon Scroggins III 03588412c8 Fix webp bug compositing alpha frames on opaque (better fix)
The old code made the wrong assumptions about premultiplication.

There are three relevant steps here for decoding a webp frame:
1 tell libwebp to decode
2 colorXform the result (sometimes)
3 blend with the prior frame (sometimes)

Rearrange the code to premultiply at the blend step, in a linear space.
If the client wants unpremul, the blend step will unpremul after.

If there is no blending, the colorXform (if any) will premultiply.

If only step 1 is necessary, let libwebp premultiply.

This fixes an animated image that has an opaque frame 0 followed by a
frame with alpha that blends with it.

Add the test image that failed (https://mathiasbynens.be/demo/animated-webp)

The prior fix is in 42bae8faa4. It did
not properly handle the colorXform when there was no blending step.

Change-Id: I2b9d265ba162eaf7e55a106c8f79341826cee0d3
Reviewed-on: https://skia-review.googlesource.com/72281
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-17 13:28:45 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Revert "Revert "Direct evaluation of gaussian"" 2017-11-16 22:46:09 +00:00
bin bin/try: Add interactive mode 2017-10-18 17:16:16 +00:00
debugger Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
dm Use GrContextFactories that produce a single GrContext in unit tests. 2017-11-15 22:03:07 +00:00
docs Update doc and example for SkPaint::FontMetrics. 2017-11-09 18:20:14 +00:00
example Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
experimental [v8-platform] Store the platform in a unique_ptr 2017-11-09 17:19:14 +00:00
fuzz Revert "Revert "Remove MakeForLocalSpace since picture image is sufficient"" 2017-11-09 21:50:27 +00:00
gm test scalePixels and unpremul 2017-11-16 17:34:54 +00:00
gn Revert "Add method to sk_gpu_test::TestContext to automatically restore the previous context." 2017-11-16 22:31:39 +00:00
include Add backend GPU objects to fiddle app 2017-11-17 12:53:55 +00:00
infra Fix webp bug compositing alpha frames on opaque (better fix) 2017-11-17 13:28:45 +00:00
platform_tools platform_tools/android/bin/android_gdbserver: fix error 2017-10-13 16:06:28 +00:00
resources Extract Android FontMgr part of Typeface test. 2017-11-13 17:00:31 +00:00
samplecode Alloc glyph image correctly for SkMask::k3D_Format. 2017-11-14 17:38:34 +00:00
site Update doc and example for SkPaint::FontMetrics. 2017-11-09 18:20:14 +00:00
src Fix webp bug compositing alpha frames on opaque (better fix) 2017-11-17 13:28:45 +00:00
tests Add backend GPU objects to fiddle app 2017-11-17 12:53:55 +00:00
third_party Suppress warning 4577 (noexcept used with no exception handling mechanism specified) 2017-11-12 19:38:16 +00:00
tools Add backend GPU objects to fiddle app 2017-11-17 12:53:55 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore Ignore generated README.recipes.md 2017-10-26 18:07:27 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS fix use of uninitialized flag in SkCodec 2017-10-09 19:17:05 +00:00
BUILD.gn Add backend GPU objects to fiddle app 2017-11-17 12:53: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 skia/third_party/externals/angle2/ 8957b6c07..1eda27a65 (4 commits) 2017-11-17 06:23:15 +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
PRESUBMIT.py Add in test_filter to build configuration 2017-10-16 11:09:49 +00:00
public.bzl Drop support for OSMesa in test tools and remove build bot 2017-11-13 16:20:10 +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 Revert "Whitespace change to test Android autoroller" 2017-09-07 15:25:02 +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.