"Ensure frame rect is on screen or empty" - take 2

Revert commit e13b82fac077383d9f93631a177573509be44f38
(I215b312b421a30bf985f681424a4c4198f069862), and fix a different way.
The prior fix resulted in incorrectly decoding a frame whose bounds
extended beyond the canvas. Instead of changing the internal frame rect,
just change the one passed to the client.

Change-Id: I82568cb672f1027a9dc17ec0a15d355d561c356d
Reviewed-on: https://skia-review.googlesource.com/c/libgifcodec/+/353445
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2 files changed
tree: 4d9c1a42bf9db407b55d247835832dba1226b3aa
  1. libgifcodec.gni
  2. LICENSE.md
  3. README.chromium
  4. README.md
  5. SkGifCodec.h
  6. SkGifImageReader.cpp
  7. SkGifImageReader.h
  8. SkLibGifCodec.cpp
  9. SkLibGifCodec.h
README.md

LIBGIF CODEC FOR SKIA

libgifcodec is based on a fork of libgif made by Chromium. It was copied into Skia with https://codereview.chromium.org/2045293002, as https://skia.googlesource.com/skia/+/19b91531e912283d237435d94516575b28713cba.

The header file SkGifCodec.h exposes two functions:

  • bool SkGifCodec::IsGif(const void*, size_t);

  • std::unique_ptr<SkCodec> SkGifCodec::MakeFromStream(std::unique_ptr<SkStream>, SkCodec::Result*);

Which can be used by Skia's SkCodec::MakeFromStream to implement GIF Decoding.

See LICENSE.md for the license information.