From a4db9be6a28c3a2c24c31e721ac804aec47ad379 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Tue, 11 Apr 2017 10:32:02 -0400 Subject: Correct GIF frame dependencies and track alpha Add SkCodec::FrameInfo::fAlphaType. The SkImageInfo for the SkCodec specifies the SkAlphaType for the first frame, but the opacity can vary from frame to frame. When determining the required frame, also compute whether a frame has alpha. Update how we determine the required frame, which had bugs. (Update a test that had an incorrect required frame as a result.) Add new test images covering cases that have been fixed: - randPixelsAnim2.gif It has the following frames: A (keep) B (keep) (subset) C (disposePrevious) (covers B) D (any) (does *not* cover B) B and C depend on A, but D depends on B, since after disposing C, B should be visible again. - alphabetAnim.gif Includes frames which fill the image size, with different disposal methods and transparencies. Change-Id: Ie086167711c4cac4931ed8c4ddaeb9c9b0b91fdb Reviewed-on: https://skia-review.googlesource.com/9810 Commit-Queue: Leon Scroggins Reviewed-by: Mike Reed Reviewed-by: Matt Sarett --- resources/alphabetAnim.gif | Bin 0 -> 1770 bytes resources/randPixelsAnim2.gif | Bin 0 -> 514 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/alphabetAnim.gif create mode 100644 resources/randPixelsAnim2.gif (limited to 'resources') diff --git a/resources/alphabetAnim.gif b/resources/alphabetAnim.gif new file mode 100644 index 0000000000..d6b7d85b0e Binary files /dev/null and b/resources/alphabetAnim.gif differ diff --git a/resources/randPixelsAnim2.gif b/resources/randPixelsAnim2.gif new file mode 100644 index 0000000000..2b2b456155 Binary files /dev/null and b/resources/randPixelsAnim2.gif differ -- cgit v1.2.3