aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2016-12-22 16:40:24 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-03 19:07:41 +0000
commitb0b625b79605ab0a18aa038f3f87e88da2441c16 (patch)
tree0d8532d06856bc0926230da2e00adf6d7fbf0c7e /resources
parente337b185602ff198ef8b4567db3f6ef01f89475e (diff)
GIF: Better check for frame dependency
If a frame does not have a valid transparent index and it covers the prior frame, it does not really depend on that frame. Instead, it depends on the frame that the prior frame depends on. Determine this once we have parsed the local color map (if any), so a transparent index out of range of the color map is not considered valid. Share code that determines whether a frame has a transparent pixel. Add a test that we compute the dependencies correctly. randPixelsAnim.gif has 13 frames. After the first, the frames cover all combinations of - Whether the prior frame was keep, restoreBG or restoreToPrevious - Whether the new frame covers the prior frame - Whether the new frame has a transparent pixel (It only does so when using a global color table. It may make sense to expand the test to also cover using local color tables.) The test caught a bug where we incorrectly reused an existing SkColorTable for a different frame. Fix that bug by keeping track of the transparent index associated with the current SkColorTable. Change-Id: I3cf6be7f612990fa7a00d9e74d116d31bd227526 Reviewed-on: https://skia-review.googlesource.com/6402 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/randPixelsAnim.gifbin0 -> 1225 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/resources/randPixelsAnim.gif b/resources/randPixelsAnim.gif
new file mode 100644
index 0000000000..7b12bfc6f6
--- /dev/null
+++ b/resources/randPixelsAnim.gif
Binary files differ