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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageSource.h

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef ImageSource_h 26 #ifndef ImageSource_h
27 #define ImageSource_h 27 #define ImageSource_h
28 28
29 #include "platform/PlatformExport.h" 29 #include "platform/PlatformExport.h"
30 #include "platform/graphics/DeferredImageDecoder.h" 30 #include "platform/graphics/DeferredImageDecoder.h"
31 #include "platform/graphics/ImageOrientation.h" 31 #include "platform/graphics/ImageOrientation.h"
32 #include "third_party/skia/include/core/SkRefCnt.h"
32 #include "wtf/Forward.h" 33 #include "wtf/Forward.h"
33 #include "wtf/Noncopyable.h" 34 #include "wtf/Noncopyable.h"
34 #include <memory> 35 #include <memory>
35 36
36 class SkImage; 37 class SkImage;
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class ImageOrientation; 41 class ImageOrientation;
41 class IntPoint; 42 class IntPoint;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool hasColorProfile() const; 79 bool hasColorProfile() const;
79 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st; 80 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st;
80 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const; 81 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const;
81 82
82 bool getHotSpot(IntPoint&) const; 83 bool getHotSpot(IntPoint&) const;
83 int repetitionCount(); 84 int repetitionCount();
84 85
85 size_t frameCount() const; 86 size_t frameCount() const;
86 87
87 // Attempts to create the requested frame. 88 // Attempts to create the requested frame.
88 PassRefPtr<SkImage> createFrameAtIndex(size_t); 89 sk_sp<SkImage> createFrameAtIndex(size_t);
89 90
90 float frameDurationAtIndex(size_t) const; 91 float frameDurationAtIndex(size_t) const;
91 bool frameHasAlphaAtIndex(size_t) const; // Whether or not the frame actuall y used any alpha. 92 bool frameHasAlphaAtIndex(size_t) const; // Whether or not the frame actuall y used any alpha.
92 bool frameIsCompleteAtIndex(size_t) const; // Whether or not the frame is fu lly received. 93 bool frameIsCompleteAtIndex(size_t) const; // Whether or not the frame is fu lly received.
93 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation 94 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation
94 95
95 // Returns the number of bytes in the decoded frame. May return 0 if the 96 // Returns the number of bytes in the decoded frame. May return 0 if the
96 // frame has not yet begun to decode. 97 // frame has not yet begun to decode.
97 size_t frameBytesAtIndex(size_t) const; 98 size_t frameBytesAtIndex(size_t) const;
98 99
99 private: 100 private:
100 std::unique_ptr<DeferredImageDecoder> m_decoder; 101 std::unique_ptr<DeferredImageDecoder> m_decoder;
101 }; 102 };
102 103
103 } // namespace blink 104 } // namespace blink
104 105
105 #endif 106 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698