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

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

Issue 1008243003: Nuke NativeImageSkia -- new version. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add more WARN_UNUSED_RETURN goodness Created 5 years, 9 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 | Annotate | Revision Log
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 14 matching lines...) Expand all
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/ImageOrientation.h" 30 #include "platform/graphics/ImageOrientation.h"
31 #include "wtf/Forward.h" 31 #include "wtf/Forward.h"
32 #include "wtf/Noncopyable.h" 32 #include "wtf/Noncopyable.h"
33 #include "wtf/OwnPtr.h" 33 #include "wtf/OwnPtr.h"
34 34
35 class SkBitmap;
36
35 namespace blink { 37 namespace blink {
36 38
37 class DeferredImageDecoder; 39 class DeferredImageDecoder;
38 class ImageOrientation; 40 class ImageOrientation;
39 class IntPoint; 41 class IntPoint;
40 class IntSize; 42 class IntSize;
41 class NativeImageSkia;
42 class SharedBuffer; 43 class SharedBuffer;
43 44
44 // This is a helper class used by BitmapImage only. If you need an image 45 // This is a helper class used by BitmapImage only. If you need an image
45 // decoder then you should look into 46 // decoder then you should look into
46 // Source/platform/image-decoders/ImageDecoder.h. 47 // Source/platform/image-decoders/ImageDecoder.h.
47 class PLATFORM_EXPORT ImageSource { 48 class PLATFORM_EXPORT ImageSource {
48 WTF_MAKE_NONCOPYABLE(ImageSource); 49 WTF_MAKE_NONCOPYABLE(ImageSource);
49 public: 50 public:
50 enum AlphaOption { 51 enum AlphaOption {
51 AlphaPremultiplied, 52 AlphaPremultiplied,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool isSizeAvailable(); 87 bool isSizeAvailable();
87 bool hasColorProfile() const; 88 bool hasColorProfile() const;
88 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st; 89 IntSize size(RespectImageOrientationEnum = DoNotRespectImageOrientation) con st;
89 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const; 90 IntSize frameSizeAtIndex(size_t, RespectImageOrientationEnum = DoNotRespectI mageOrientation) const;
90 91
91 bool getHotSpot(IntPoint&) const; 92 bool getHotSpot(IntPoint&) const;
92 int repetitionCount(); 93 int repetitionCount();
93 94
94 size_t frameCount() const; 95 size_t frameCount() const;
95 96
96 PassRefPtr<NativeImageSkia> createFrameAtIndex(size_t); 97 bool createFrameAtIndex(size_t, SkBitmap*);
97 98
98 float frameDurationAtIndex(size_t) const; 99 float frameDurationAtIndex(size_t) const;
99 bool frameHasAlphaAtIndex(size_t) const; // Whether or not the frame actuall y used any alpha. 100 bool frameHasAlphaAtIndex(size_t) const; // Whether or not the frame actuall y used any alpha.
100 bool frameIsCompleteAtIndex(size_t) const; // Whether or not the frame is fu lly received. 101 bool frameIsCompleteAtIndex(size_t) const; // Whether or not the frame is fu lly received.
101 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation 102 ImageOrientation orientationAtIndex(size_t) const; // EXIF image orientation
102 103
103 // Return the number of bytes in the decoded frame. If the frame is not yet 104 // Return the number of bytes in the decoded frame. If the frame is not yet
104 // decoded then return 0. 105 // decoded then return 0.
105 unsigned frameBytesAtIndex(size_t) const; 106 unsigned frameBytesAtIndex(size_t) const;
106 107
107 private: 108 private:
108 OwnPtr<DeferredImageDecoder> m_decoder; 109 OwnPtr<DeferredImageDecoder> m_decoder;
109 110
110 AlphaOption m_alphaOption; 111 AlphaOption m_alphaOption;
111 GammaAndColorProfileOption m_gammaAndColorProfileOption; 112 GammaAndColorProfileOption m_gammaAndColorProfileOption;
112 }; 113 };
113 114
114 } // namespace blink 115 } // namespace blink
115 116
116 #endif 117 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageLayerChromiumTest.cpp ('k') | Source/platform/graphics/ImageSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698