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
diff --git a/libs/hwui/jni/BitmapFactory.cpp b/libs/hwui/jni/BitmapFactory.cpp
index d4e27d8..09196cf 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 @@
     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 @@
     // 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);