skia: add heif decoding support

Bug: b/64077740
Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
Reviewed-on: https://skia-review.googlesource.com/35123
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 4e68cd1..ddf72cd 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -919,8 +919,8 @@
 // wbmp images have a header that can be arbitrarily large, depending on the
 // size of the image. We cap the size at 65535, meaning we only need to look at
 // 8 bytes to determine whether we can read the image. This is important
-// because SkCodec only passes 14 bytes to SkWbmpCodec to determine whether the
-// image is a wbmp.
+// because SkCodec only passes a limited number of bytes to SkWbmpCodec to
+// determine whether the image is a wbmp.
 DEF_TEST(Codec_wbmp_max_size, r) {
     const unsigned char maxSizeWbmp[] = { 0x00, 0x00,           // Header
                                           0x83, 0xFF, 0x7F,     // W: 65535
@@ -1277,7 +1277,7 @@
             "randPixels.bmp",
             };
     for (auto file : files) {
-        auto stream = LimitedRewindingStream::Make(file, 14);
+        auto stream = LimitedRewindingStream::Make(file, SkCodec::MinBufferedBytesNeeded());
         if (!stream) {
             SkDebugf("Missing resources (%s). Set --resourcePath.\n", file);
             return;