aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/SkFrontBufferedStream.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/utils/SkFrontBufferedStream.h b/include/utils/SkFrontBufferedStream.h
index 3532fc5259..a47acf8a06 100644
--- a/include/utils/SkFrontBufferedStream.h
+++ b/include/utils/SkFrontBufferedStream.h
@@ -8,10 +8,7 @@
#ifndef SkFrontBufferedStream_DEFINED
#define SkFrontBufferedStream_DEFINED
-#include "SkTypes.h"
-
-class SkStream;
-class SkStreamRewindable;
+#include "SkStream.h"
/**
* Specialized stream that buffers the first X bytes of a stream,
@@ -36,6 +33,13 @@ public:
* NULL on failure. The caller is required to delete when finished with
* this object.
*/
- static SkStreamRewindable* Create(SkStream* stream, size_t minBufferSize);
+ static std::unique_ptr<SkStreamRewindable> Make(std::unique_ptr<SkStream> stream,
+ size_t minBufferSize);
+
+#ifdef SK_SUPPORT_LEGACY_STREAM_API
+ static SkStreamRewindable* Create(SkStream* stream, size_t minBufferSize) {
+ return Make(std::unique_ptr<SkStream>(stream), minBufferSize).release();
+ }
+#endif
};
#endif // SkFrontBufferedStream_DEFINED