summaryrefslogtreecommitdiff
path: root/libs/hwui/jni/BitmapFactory.cpp
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2020-04-21 14:08:32 -0400
committerLeon Scroggins III <scroggo@google.com>2020-04-21 14:27:31 -0400
commit2bcdf6fbdfe551bb66fc4972209c899f875e04f9 (patch)
treefaa575d3bc2da96e1dca17088bf9f465de22fbb6 /libs/hwui/jni/BitmapFactory.cpp
parentc8d49effd583b1c6b052c39e52d71d226c029dd0 (diff)
Use the new name for SkFrontBufferedStream
Bug: skbug.com/10154 Test: CtsGraphicsTestCases The API is being moved to a new file and renamed. Use the new API. Remove an unncessary FIXME and comment in Movie.cpp. The hardcoded 6 is fine, and the ownership is obvious now that we use smart pointers. Change-Id: I79657626ccbd5fe2616d546c617d591928064106
Diffstat (limited to 'libs/hwui/jni/BitmapFactory.cpp')
-rw-r--r--libs/hwui/jni/BitmapFactory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/jni/BitmapFactory.cpp b/libs/hwui/jni/BitmapFactory.cpp
index d4e27d812500..09196cf5f096 100644
--- a/libs/hwui/jni/BitmapFactory.cpp
+++ b/libs/hwui/jni/BitmapFactory.cpp
@@ -3,12 +3,12 @@
#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"
@@ -510,8 +510,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 +565,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);