aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-09-15 21:03:54 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 21:04:07 +0000
commit7031b247c9fe0cb8fa32129f9bc24fea2043cee2 (patch)
tree6ded4ad2071a03530ead08e4f5e1a41f4c42c563 /include/utils
parentf95352322496796ce4c99df9582dbc630fe8a327 (diff)
Revert "use unique_ptr for stream api"
This reverts commit 49f1f34438d3431f6d7e32847accd2ba96948a73. Reason for revert: broke win-chrome ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): error C2228: left of '.release' must have class/struct/union ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: type is 'SkStreamAsset *' ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: did you intend to use '->' instead? Original change's description: > use unique_ptr for stream api > > Bug: skia:6888 > Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8 > Reviewed-on: https://skia-review.googlesource.com/26740 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@chromium.org,mtklein@google.com,bungeman@google.com,reed@google.com Change-Id: Ic1e4af557317abd06b7f6b7f5056645df7e469f0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6888 Reviewed-on: https://skia-review.googlesource.com/47440 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/SkFrontBufferedStream.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/utils/SkFrontBufferedStream.h b/include/utils/SkFrontBufferedStream.h
index a47acf8a06..3532fc5259 100644
--- a/include/utils/SkFrontBufferedStream.h
+++ b/include/utils/SkFrontBufferedStream.h
@@ -8,7 +8,10 @@
#ifndef SkFrontBufferedStream_DEFINED
#define SkFrontBufferedStream_DEFINED
-#include "SkStream.h"
+#include "SkTypes.h"
+
+class SkStream;
+class SkStreamRewindable;
/**
* Specialized stream that buffers the first X bytes of a stream,
@@ -33,13 +36,6 @@ public:
* NULL on failure. The caller is required to delete when finished with
* this object.
*/
- 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
+ static SkStreamRewindable* Create(SkStream* stream, size_t minBufferSize);
};
#endif // SkFrontBufferedStream_DEFINED