Refactor Image source provider

Skia use SKMemoryStream to read file mapping data
SKMemoryStream always use memcpy to emulate posix read stream behaviour, cannot take advantages of file mapping reading

* https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/src/core/SkStream.cpp#L335
This commit is contained in:
tarsin committed 2023-02-13 18:21:57 +08:00
1 parent 0e6156e51c
commit d30379251d
5 files changed
+47 -85

No files matched your search

@@ -855,7 +855,7 @@ public final class SpiderQueen implements Runnable {
continue;
}
Image.ByteBufferSource src = mSpiderDen.getImageSource(index);
Image.CloseableSource src = mSpiderDen.getImageSource(index);
if (src == null) {
resetDecodeIndex();
// Can't find the file, it might be removed from cache,