Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/SegmentReader.h

Issue 2206263003: Remove SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ref when needed. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "third_party/skia/include/core/SkData.h" 9 #include "third_party/skia/include/core/SkData.h"
10 #include "third_party/skia/include/core/SkRWBuffer.h" 10 #include "third_party/skia/include/core/SkRWBuffer.h"
(...skipping 16 matching lines...) Expand all
27 // modify the underlying data source. 27 // modify the underlying data source.
28 class PLATFORM_EXPORT SegmentReader : public ThreadSafeRefCounted<SegmentReader> { 28 class PLATFORM_EXPORT SegmentReader : public ThreadSafeRefCounted<SegmentReader> {
29 WTF_MAKE_NONCOPYABLE(SegmentReader); 29 WTF_MAKE_NONCOPYABLE(SegmentReader);
30 public: 30 public:
31 // This version is thread-safe so long as no thread is modifying the 31 // This version is thread-safe so long as no thread is modifying the
32 // underlying SharedBuffer. This class does not modify it, so that would 32 // underlying SharedBuffer. This class does not modify it, so that would
33 // mean modifying it in another way. 33 // mean modifying it in another way.
34 static PassRefPtr<SegmentReader> createFromSharedBuffer(PassRefPtr<SharedBuf fer>); 34 static PassRefPtr<SegmentReader> createFromSharedBuffer(PassRefPtr<SharedBuf fer>);
35 35
36 // These versions use thread-safe input, so they are always thread-safe. 36 // These versions use thread-safe input, so they are always thread-safe.
37 static PassRefPtr<SegmentReader> createFromSkData(PassRefPtr<SkData>); 37 static PassRefPtr<SegmentReader> createFromSkData(sk_sp<SkData>);
38 static PassRefPtr<SegmentReader> createFromSkROBuffer(PassRefPtr<SkROBuffer> ); 38 static PassRefPtr<SegmentReader> createFromSkROBuffer(PassRefPtr<SkROBuffer> );
39 39
40 SegmentReader() {} 40 SegmentReader() {}
41 virtual ~SegmentReader() {} 41 virtual ~SegmentReader() {}
42 virtual size_t size() const = 0; 42 virtual size_t size() const = 0;
43 virtual size_t getSomeData(const char*& data, size_t position) const = 0; 43 virtual size_t getSomeData(const char*& data, size_t position) const = 0;
44 virtual PassRefPtr<SkData> getAsSkData() const = 0; 44 virtual sk_sp<SkData> getAsSkData() const = 0;
45 }; 45 };
46 46
47 } // namespace blink 47 } // namespace blink
48 #endif // SegmentReader_h 48 #endif // SegmentReader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698