| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SegmentReader_h | 5 #ifndef SegmentReader_h |
| 6 #define SegmentReader_h | 6 #define SegmentReader_h |
| 7 | 7 |
| 8 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
| 9 #include "platform/wtf/Noncopyable.h" |
| 10 #include "platform/wtf/PassRefPtr.h" |
| 11 #include "platform/wtf/ThreadSafeRefCounted.h" |
| 9 #include "third_party/skia/include/core/SkData.h" | 12 #include "third_party/skia/include/core/SkData.h" |
| 10 #include "third_party/skia/include/core/SkRWBuffer.h" | 13 #include "third_party/skia/include/core/SkRWBuffer.h" |
| 11 #include "third_party/skia/include/core/SkRefCnt.h" | 14 #include "third_party/skia/include/core/SkRefCnt.h" |
| 12 #include "wtf/Noncopyable.h" | |
| 13 #include "wtf/PassRefPtr.h" | |
| 14 #include "wtf/ThreadSafeRefCounted.h" | |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 // Interface that looks like SharedBuffer. Used by ImageDecoders to use various | 18 // Interface that looks like SharedBuffer. Used by ImageDecoders to use various |
| 19 // sources of input including: | 19 // sources of input including: |
| 20 // - SharedBuffer | 20 // - SharedBuffer |
| 21 // - for when the caller already has a SharedBuffer | 21 // - for when the caller already has a SharedBuffer |
| 22 // - SkData | 22 // - SkData |
| 23 // - for when the caller already has an SkData | 23 // - for when the caller already has an SkData |
| 24 // - SkROBuffer | 24 // - SkROBuffer |
| (...skipping 18 matching lines...) Expand all Loading... |
| 43 | 43 |
| 44 SegmentReader() {} | 44 SegmentReader() {} |
| 45 virtual ~SegmentReader() {} | 45 virtual ~SegmentReader() {} |
| 46 virtual size_t size() const = 0; | 46 virtual size_t size() const = 0; |
| 47 virtual size_t getSomeData(const char*& data, size_t position) const = 0; | 47 virtual size_t getSomeData(const char*& data, size_t position) const = 0; |
| 48 virtual sk_sp<SkData> getAsSkData() const = 0; | 48 virtual sk_sp<SkData> getAsSkData() const = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace blink | 51 } // namespace blink |
| 52 #endif // SegmentReader_h | 52 #endif // SegmentReader_h |
| OLD | NEW |