From fc49b403eb3353fdefe97672017df10b64dee95a Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Mon, 31 Oct 2016 14:08:56 -0400 Subject: Use correct color table for prior GIF frames While investigating skbug.com/5883 I noticed that we use the color table for the current frame even while recursively decoding frames that the current frame depends on. This CL updates fCurrColorTable, fCurrColorTableIsReal and fSwizzler before decoding prior frames, and then sets them back afterwards. Move telling the client about the color table into prepareToDecode, since the other callers do not need to do so. (That is only necessary for decoding to index 8, which is unsupported for frames with dependencies.) Add a test that exposes the bug. colorTables.gif has a local color table in its second frame that does not match the global table used by the first frame. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4208 Change-Id: Id2dc9e3283adfd92801d2f38726afa74574b1955 Reviewed-on: https://skia-review.googlesource.com/4208 Reviewed-by: Joost Ouwerling Reviewed-by: Matt Sarett Commit-Queue: Leon Scroggins --- resources/colorTables.gif | Bin 0 -> 2829 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/colorTables.gif (limited to 'resources') diff --git a/resources/colorTables.gif b/resources/colorTables.gif new file mode 100644 index 0000000000..f25d13cfaa Binary files /dev/null and b/resources/colorTables.gif differ -- cgit v1.2.3