diff options
author | Daniel Norman <danielnorman@google.com> | 2020-08-31 12:05:49 -0700 |
---|---|---|
committer | Bill Peckham <bpeckham@google.com> | 2020-09-09 10:21:03 -0700 |
commit | 8abdf0e95a5d15a310b6df69d33a4510a0b44b4a (patch) | |
tree | f0c990be5370711e157b2e9e5ae746cb1af915b9 /libs/hwui/jni/BitmapFactory.cpp | |
parent | 93e6c963c3228074d0e0dd5f3f8d057d9bd11e05 (diff) | |
parent | 6997558ebbaa0c3e5708246807239f11e70ad35d (diff) |
Merge SP1A.200727.001
Change-Id: Ibb86a528ed692cde325705779c7fa57e4b4de682
Diffstat (limited to 'libs/hwui/jni/BitmapFactory.cpp')
-rw-r--r-- | libs/hwui/jni/BitmapFactory.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/hwui/jni/BitmapFactory.cpp b/libs/hwui/jni/BitmapFactory.cpp index d4e27d812500..7d2583a2ac01 100644 --- a/libs/hwui/jni/BitmapFactory.cpp +++ b/libs/hwui/jni/BitmapFactory.cpp @@ -3,12 +3,11 @@ #include "BitmapFactory.h" #include "CreateJavaOutputStreamAdaptor.h" +#include "FrontBufferedStream.h" #include "GraphicsJNI.h" #include "MimeType.h" #include "NinePatchPeeker.h" #include "SkAndroidCodec.h" -#include "SkBRDAllocator.h" -#include "SkFrontBufferedStream.h" #include "SkMath.h" #include "SkPixelRef.h" #include "SkStream.h" @@ -16,7 +15,7 @@ #include "Utils.h" #include <HardwareBitmapUploader.h> -#include <nativehelper/JNIHelp.h> +#include <nativehelper/JNIPlatformHelp.h> #include <androidfw/Asset.h> #include <androidfw/ResourceTypes.h> #include <cutils/compiler.h> @@ -510,8 +509,8 @@ static jobject nativeDecodeStream(JNIEnv* env, jobject clazz, jobject is, jbyteA std::unique_ptr<SkStream> stream(CreateJavaInputStreamAdaptor(env, is, storage)); if (stream.get()) { - std::unique_ptr<SkStreamRewindable> bufferedStream( - SkFrontBufferedStream::Make(std::move(stream), SkCodec::MinBufferedBytesNeeded())); + std::unique_ptr<SkStreamRewindable> bufferedStream(skia::FrontBufferedStream::Make( + std::move(stream), SkCodec::MinBufferedBytesNeeded())); SkASSERT(bufferedStream.get() != NULL); bitmap = doDecode(env, std::move(bufferedStream), padding, options, inBitmapHandle, colorSpaceHandle); @@ -565,8 +564,8 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, jobject fi // Use a buffered stream. Although an SkFILEStream can be rewound, this // ensures that SkImageDecoder::Factory never rewinds beyond the // current position of the file descriptor. - std::unique_ptr<SkStreamRewindable> stream(SkFrontBufferedStream::Make(std::move(fileStream), - SkCodec::MinBufferedBytesNeeded())); + std::unique_ptr<SkStreamRewindable> stream(skia::FrontBufferedStream::Make( + std::move(fileStream), SkCodec::MinBufferedBytesNeeded())); return doDecode(env, std::move(stream), padding, bitmapFactoryOptions, inBitmapHandle, colorSpaceHandle); |