diff options
author | Leon Scroggins III <scroggo@google.com> | 2020-09-10 14:57:11 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2020-09-15 15:52:38 +0000 |
commit | d172a0cff8b7b3a4332d5992a87c5e3ab1784174 (patch) | |
tree | 1d2ea8e5001c7bf70f2cd608433a130ba420d4e1 /opengl/java | |
parent | fc6fbde5dfaf9690251a8a399d627c45ac03f7cd (diff) |
ImageDecoder: Use AssetFileDescriptor's length
Bug: 166069819
Test: ImageDecoderTest (cts)
The contained asset may only be a subset of the AssetFileDescriptor.
SkWebpCodec reads the entire stream into a contiguous block of memory.
(This is because libwebp does not provide a streaming API for creating
its demuxer.) If the AssetFileDescriptor contains data after the webp
file, this wastes memory. In some cases, there may be a *lot* of data
after the webp file, so this can use too much memory, particularly on
low memory devices.
Merged-In: I8d8e520f43a7ef0d7e4534ef165d8c7e4d2a0b55
Change-Id: I8d8e520f43a7ef0d7e4534ef165d8c7e4d2a0b55
Diffstat (limited to 'opengl/java')
0 files changed, 0 insertions, 0 deletions