/work/obj-fuzz/dist/include/imgIContainer.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/image/imgIContainer.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_imgIContainer_h__ |
6 | | #define __gen_imgIContainer_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsISupports_h__ |
10 | | #include "nsISupports.h" |
11 | | #endif |
12 | | |
13 | | #include "mozilla/AlreadyAddRefed.h" |
14 | | #include "mozilla/Assertions.h" |
15 | | #include "mozilla/DebugOnly.h" |
16 | | |
17 | | /* For IDL files that don't want to include root IDL files. */ |
18 | | #ifndef NS_NO_VTABLE |
19 | | #define NS_NO_VTABLE |
20 | | #endif |
21 | | #include "ImgDrawResult.h" |
22 | | #include "gfxContext.h" |
23 | | #include "gfxMatrix.h" |
24 | | #include "gfxRect.h" |
25 | | #include "mozilla/gfx/2D.h" |
26 | | #include "mozilla/Maybe.h" |
27 | | #include "mozilla/RefPtr.h" |
28 | | #include "nsRect.h" |
29 | | #include "nsSize.h" |
30 | | #include "limits.h" |
31 | | class nsIDocument; |
32 | | namespace mozilla { |
33 | | namespace layers { |
34 | | class LayerManager; |
35 | | class ImageContainer; |
36 | | } |
37 | | } |
38 | | class nsIFrame; |
39 | | namespace mozilla { |
40 | | class TimeStamp; |
41 | | class SVGImageContext; |
42 | | } |
43 | | namespace mozilla { |
44 | | namespace image { |
45 | | class ImageRegion; |
46 | | struct Orientation; |
47 | | } |
48 | | } |
49 | | |
50 | | /* starting interface: imgIContainer */ |
51 | | #define IMGICONTAINER_IID_STR "a8dbee24-ff86-4755-b40e-51175caf31af" |
52 | | |
53 | | #define IMGICONTAINER_IID \ |
54 | | {0xa8dbee24, 0xff86, 0x4755, \ |
55 | | { 0xb4, 0x0e, 0x51, 0x17, 0x5c, 0xaf, 0x31, 0xaf }} |
56 | | |
57 | | class imgIContainer : public nsISupports { |
58 | | public: |
59 | | |
60 | | NS_DECLARE_STATIC_IID_ACCESSOR(IMGICONTAINER_IID) |
61 | | |
62 | | /* readonly attribute int32_t width; */ |
63 | | NS_IMETHOD GetWidth(int32_t *aWidth) = 0; |
64 | | |
65 | | /* readonly attribute int32_t height; */ |
66 | | NS_IMETHOD GetHeight(int32_t *aHeight) = 0; |
67 | | |
68 | | /* [noscript] readonly attribute nsSize intrinsicSize; */ |
69 | | NS_IMETHOD GetIntrinsicSize(nsSize * aIntrinsicSize) = 0; |
70 | | |
71 | | /* [noscript] readonly attribute nsSize intrinsicRatio; */ |
72 | | NS_IMETHOD GetIntrinsicRatio(nsSize * aIntrinsicRatio) = 0; |
73 | | |
74 | | /* [nostdcall,notxpcom] nsIntSizeByVal optimalImageSizeForDest ([const] in gfxSize aDest, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, in uint32_t aFlags); */ |
75 | | virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) = 0; |
76 | | |
77 | | enum { |
78 | | TYPE_RASTER = 0U, |
79 | | TYPE_VECTOR = 1U |
80 | | }; |
81 | | |
82 | | /* [infallible] readonly attribute unsigned short type; */ |
83 | | NS_IMETHOD GetType(uint16_t *aType) = 0; |
84 | | inline uint16_t GetType() |
85 | 0 | { |
86 | 0 | uint16_t result; |
87 | 0 | mozilla::DebugOnly<nsresult> rv = GetType(&result); |
88 | 0 | MOZ_ASSERT(NS_SUCCEEDED(rv)); |
89 | 0 | return result; |
90 | 0 | } |
91 | | |
92 | | /* readonly attribute boolean animated; */ |
93 | | NS_IMETHOD GetAnimated(bool *aAnimated) = 0; |
94 | | |
95 | | enum { |
96 | | FLAG_NONE = 0U, |
97 | | FLAG_SYNC_DECODE = 1U, |
98 | | FLAG_SYNC_DECODE_IF_FAST = 2U, |
99 | | FLAG_ASYNC_NOTIFY = 4U, |
100 | | FLAG_DECODE_NO_PREMULTIPLY_ALPHA = 8U, |
101 | | FLAG_DECODE_NO_COLORSPACE_CONVERSION = 16U, |
102 | | FLAG_CLAMP = 32U, |
103 | | FLAG_HIGH_QUALITY_SCALING = 64U, |
104 | | FLAG_WANT_DATA_SURFACE = 128U, |
105 | | FLAG_BYPASS_SURFACE_CACHE = 256U, |
106 | | FLAG_FORCE_PRESERVEASPECTRATIO_NONE = 512U, |
107 | | FLAG_FORCE_UNIFORM_SCALING = 1024U, |
108 | | DECODE_FLAGS_DEFAULT = 0U, |
109 | | FRAME_FIRST = 0U, |
110 | | FRAME_CURRENT = 1U, |
111 | | FRAME_MAX_VALUE = 1U |
112 | | }; |
113 | | |
114 | | /* [noscript,notxpcom] TempRefSourceSurface getFrame (in uint32_t aWhichFrame, in uint32_t aFlags); */ |
115 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) = 0; |
116 | | |
117 | | /* [noscript,notxpcom] TempRefSourceSurface getFrameAtSize ([const] in nsIntSize aSize, in uint32_t aWhichFrame, in uint32_t aFlags); */ |
118 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) = 0; |
119 | | |
120 | | /* [noscript,notxpcom] boolean willDrawOpaqueNow (); */ |
121 | | NS_IMETHOD_(bool) WillDrawOpaqueNow(void) = 0; |
122 | | |
123 | | /* [noscript,notxpcom] boolean isImageContainerAvailable (in LayerManager aManager, in uint32_t aFlags); */ |
124 | | NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager * aManager, uint32_t aFlags) = 0; |
125 | | |
126 | | /* [noscript,notxpcom] TempRefImageContainer getImageContainer (in LayerManager aManager, in uint32_t aFlags); */ |
127 | | NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager * aManager, uint32_t aFlags) = 0; |
128 | | |
129 | | /* [noscript,notxpcom] ImgDrawResult getImageContainerAtSize (in LayerManager aManager, [const] in nsIntSize aSize, [const] in MaybeSVGImageContext aSVGContext, in uint32_t aFlags, out ImageContainer aOutContainer); */ |
130 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) GetImageContainerAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, mozilla::layers::ImageContainer * * aOutContainer) = 0; |
131 | | |
132 | | /* [noscript,notxpcom] boolean isImageContainerAvailableAtSize (in LayerManager aManager, [const] in nsIntSize aSize, in uint32_t aFlags); */ |
133 | | NS_IMETHOD_(bool) IsImageContainerAvailableAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, uint32_t aFlags) = 0; |
134 | | |
135 | | /* [noscript,notxpcom] ImgDrawResult draw (in gfxContext aContext, [const] in nsIntSize aSize, [const] in ImageRegion aRegion, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, [const] in MaybeSVGImageContext aSVGContext, in uint32_t aFlags, in float aOpacity); */ |
136 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) Draw(gfxContext * aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) = 0; |
137 | | |
138 | | /* [noscript] void startDecoding (in uint32_t aFlags); */ |
139 | | NS_IMETHOD StartDecoding(uint32_t aFlags) = 0; |
140 | | |
141 | | /* [noscript,notxpcom] boolean startDecodingWithResult (in uint32_t aFlags); */ |
142 | | NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) = 0; |
143 | | |
144 | | /* [noscript] void requestDecodeForSize ([const] in nsIntSize aSize, in uint32_t aFlags); */ |
145 | | NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) = 0; |
146 | | |
147 | | /* void lockImage (); */ |
148 | | NS_IMETHOD LockImage(void) = 0; |
149 | | |
150 | | /* void unlockImage (); */ |
151 | | NS_IMETHOD UnlockImage(void) = 0; |
152 | | |
153 | | /* void requestDiscard (); */ |
154 | | NS_IMETHOD RequestDiscard(void) = 0; |
155 | | |
156 | | /* [notxpcom] void requestRefresh ([const] in TimeStamp aTime); */ |
157 | | NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) = 0; |
158 | | |
159 | | enum { |
160 | | kNormalAnimMode = 0, |
161 | | kDontAnimMode = 1, |
162 | | kLoopOnceAnimMode = 2 |
163 | | }; |
164 | | |
165 | | /* attribute unsigned short animationMode; */ |
166 | | NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) = 0; |
167 | | NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) = 0; |
168 | | |
169 | | /* void resetAnimation (); */ |
170 | | NS_IMETHOD ResetAnimation(void) = 0; |
171 | | |
172 | | /* [notxpcom] float getFrameIndex (in uint32_t aWhichFrame); */ |
173 | | NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) = 0; |
174 | | |
175 | | /* [notxpcom] Orientation getOrientation (); */ |
176 | | NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) = 0; |
177 | | |
178 | | /* [notxpcom] int32_t getFirstFrameDelay (); */ |
179 | | NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) = 0; |
180 | | |
181 | | /* [notxpcom] void setAnimationStartTime ([const] in TimeStamp aTime); */ |
182 | | NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) = 0; |
183 | | |
184 | | /* [notxpcom] nsIntRectByVal getImageSpaceInvalidationRect ([const] in nsIntRect aRect); */ |
185 | | NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) = 0; |
186 | | |
187 | | /* [nostdcall,notxpcom] TempRefImgIContainer unwrap (); */ |
188 | | virtual already_AddRefed<imgIContainer> Unwrap(void) = 0; |
189 | | |
190 | | /* [noscript,notxpcom] void propagateUseCounters (in nsIDocument aDocument); */ |
191 | | NS_IMETHOD_(void) PropagateUseCounters(nsIDocument * aDocument) = 0; |
192 | | |
193 | | /* |
194 | | * Get the set of sizes the image can decode to natively. |
195 | | */ |
196 | | virtual nsresult GetNativeSizes(nsTArray<nsIntSize>& aNativeSizes) const = 0; |
197 | | virtual size_t GetNativeSizesLength() const = 0; |
198 | | }; |
199 | | |
200 | | NS_DEFINE_STATIC_IID_ACCESSOR(imgIContainer, IMGICONTAINER_IID) |
201 | | |
202 | | /* Use this macro when declaring classes that implement this interface. */ |
203 | | #define NS_DECL_IMGICONTAINER \ |
204 | | NS_IMETHOD GetWidth(int32_t *aWidth) override; \ |
205 | | NS_IMETHOD GetHeight(int32_t *aHeight) override; \ |
206 | | NS_IMETHOD GetIntrinsicSize(nsSize * aIntrinsicSize) override; \ |
207 | | NS_IMETHOD GetIntrinsicRatio(nsSize * aIntrinsicRatio) override; \ |
208 | | virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override; \ |
209 | | using imgIContainer::GetType; \ |
210 | | NS_IMETHOD GetType(uint16_t *aType) override; \ |
211 | | NS_IMETHOD GetAnimated(bool *aAnimated) override; \ |
212 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override; \ |
213 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override; \ |
214 | | NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override; \ |
215 | | NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override; \ |
216 | | NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override; \ |
217 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) GetImageContainerAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, mozilla::layers::ImageContainer * * aOutContainer) override; \ |
218 | | NS_IMETHOD_(bool) IsImageContainerAvailableAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, uint32_t aFlags) override; \ |
219 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) Draw(gfxContext * aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override; \ |
220 | | NS_IMETHOD StartDecoding(uint32_t aFlags) override; \ |
221 | | NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override; \ |
222 | | NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override; \ |
223 | | NS_IMETHOD LockImage(void) override; \ |
224 | | NS_IMETHOD UnlockImage(void) override; \ |
225 | | NS_IMETHOD RequestDiscard(void) override; \ |
226 | | NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override; \ |
227 | | NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override; \ |
228 | | NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override; \ |
229 | | NS_IMETHOD ResetAnimation(void) override; \ |
230 | | NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override; \ |
231 | | NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override; \ |
232 | | NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override; \ |
233 | | NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override; \ |
234 | | NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override; \ |
235 | | virtual already_AddRefed<imgIContainer> Unwrap(void) override; \ |
236 | | NS_IMETHOD_(void) PropagateUseCounters(nsIDocument * aDocument) override; \ |
237 | | |
238 | | /* Use this macro when declaring the members of this interface when the |
239 | | class doesn't implement the interface. This is useful for forwarding. */ |
240 | | #define NS_DECL_NON_VIRTUAL_IMGICONTAINER \ |
241 | | nsresult GetWidth(int32_t *aWidth); \ |
242 | | nsresult GetHeight(int32_t *aHeight); \ |
243 | | nsresult GetIntrinsicSize(nsSize * aIntrinsicSize); \ |
244 | | nsresult GetIntrinsicRatio(nsSize * aIntrinsicRatio); \ |
245 | | nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags); \ |
246 | | using imgIContainer::GetType; \ |
247 | | nsresult GetType(uint16_t *aType); \ |
248 | | nsresult GetAnimated(bool *aAnimated); \ |
249 | | nsresult_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags); \ |
250 | | nsresult_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags); \ |
251 | | nsresult_(bool) WillDrawOpaqueNow(void); \ |
252 | | nsresult_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager * aManager, uint32_t aFlags); \ |
253 | | nsresult_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager * aManager, uint32_t aFlags); \ |
254 | | nsresult_(mozilla::image::ImgDrawResult) GetImageContainerAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, mozilla::layers::ImageContainer * * aOutContainer); \ |
255 | | nsresult_(bool) IsImageContainerAvailableAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, uint32_t aFlags); \ |
256 | | nsresult_(mozilla::image::ImgDrawResult) Draw(gfxContext * aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity); \ |
257 | | nsresult StartDecoding(uint32_t aFlags); \ |
258 | | nsresult_(bool) StartDecodingWithResult(uint32_t aFlags); \ |
259 | | nsresult RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags); \ |
260 | | nsresult LockImage(void); \ |
261 | | nsresult UnlockImage(void); \ |
262 | | nsresult RequestDiscard(void); \ |
263 | | nsresult_(void) RequestRefresh(const mozilla::TimeStamp & aTime); \ |
264 | | nsresult GetAnimationMode(uint16_t *aAnimationMode); \ |
265 | | nsresult SetAnimationMode(uint16_t aAnimationMode); \ |
266 | | nsresult ResetAnimation(void); \ |
267 | | nsresult_(float) GetFrameIndex(uint32_t aWhichFrame); \ |
268 | | nsresult_(mozilla::image::Orientation) GetOrientation(void); \ |
269 | | nsresult_(int32_t) GetFirstFrameDelay(void); \ |
270 | | nsresult_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime); \ |
271 | | nsresult_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect); \ |
272 | | already_AddRefed<imgIContainer> Unwrap(void); \ |
273 | | nsresult_(void) PropagateUseCounters(nsIDocument * aDocument); \ |
274 | | |
275 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
276 | | #define NS_FORWARD_IMGICONTAINER(_to) \ |
277 | | NS_IMETHOD GetWidth(int32_t *aWidth) override { return _to GetWidth(aWidth); } \ |
278 | | NS_IMETHOD GetHeight(int32_t *aHeight) override { return _to GetHeight(aHeight); } \ |
279 | | NS_IMETHOD GetIntrinsicSize(nsSize * aIntrinsicSize) override { return _to GetIntrinsicSize(aIntrinsicSize); } \ |
280 | | NS_IMETHOD GetIntrinsicRatio(nsSize * aIntrinsicRatio) override { return _to GetIntrinsicRatio(aIntrinsicRatio); } \ |
281 | | virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override { return _to OptimalImageSizeForDest(aDest, aWhichFrame, aSamplingFilter, aFlags); } \ |
282 | | using imgIContainer::GetType; \ |
283 | | NS_IMETHOD GetType(uint16_t *aType) override { return _to GetType(aType); } \ |
284 | | NS_IMETHOD GetAnimated(bool *aAnimated) override { return _to GetAnimated(aAnimated); } \ |
285 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override { return _to GetFrame(aWhichFrame, aFlags); } \ |
286 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override { return _to GetFrameAtSize(aSize, aWhichFrame, aFlags); } \ |
287 | | NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override { return _to WillDrawOpaqueNow(); } \ |
288 | | NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override { return _to IsImageContainerAvailable(aManager, aFlags); } \ |
289 | | NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override { return _to GetImageContainer(aManager, aFlags); } \ |
290 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) GetImageContainerAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, mozilla::layers::ImageContainer * * aOutContainer) override { return _to GetImageContainerAtSize(aManager, aSize, aSVGContext, aFlags, aOutContainer); } \ |
291 | | NS_IMETHOD_(bool) IsImageContainerAvailableAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, uint32_t aFlags) override { return _to IsImageContainerAvailableAtSize(aManager, aSize, aFlags); } \ |
292 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) Draw(gfxContext * aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override { return _to Draw(aContext, aSize, aRegion, aWhichFrame, aSamplingFilter, aSVGContext, aFlags, aOpacity); } \ |
293 | | NS_IMETHOD StartDecoding(uint32_t aFlags) override { return _to StartDecoding(aFlags); } \ |
294 | | NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override { return _to StartDecodingWithResult(aFlags); } \ |
295 | | NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override { return _to RequestDecodeForSize(aSize, aFlags); } \ |
296 | | NS_IMETHOD LockImage(void) override { return _to LockImage(); } \ |
297 | | NS_IMETHOD UnlockImage(void) override { return _to UnlockImage(); } \ |
298 | | NS_IMETHOD RequestDiscard(void) override { return _to RequestDiscard(); } \ |
299 | | NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override { return _to RequestRefresh(aTime); } \ |
300 | | NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override { return _to GetAnimationMode(aAnimationMode); } \ |
301 | | NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override { return _to SetAnimationMode(aAnimationMode); } \ |
302 | | NS_IMETHOD ResetAnimation(void) override { return _to ResetAnimation(); } \ |
303 | | NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override { return _to GetFrameIndex(aWhichFrame); } \ |
304 | | NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override { return _to GetOrientation(); } \ |
305 | | NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override { return _to GetFirstFrameDelay(); } \ |
306 | | NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override { return _to SetAnimationStartTime(aTime); } \ |
307 | | NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override { return _to GetImageSpaceInvalidationRect(aRect); } \ |
308 | | virtual already_AddRefed<imgIContainer> Unwrap(void) override { return _to Unwrap(); } \ |
309 | | NS_IMETHOD_(void) PropagateUseCounters(nsIDocument * aDocument) override { return _to PropagateUseCounters(aDocument); } \ |
310 | | |
311 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
312 | | #define NS_FORWARD_SAFE_IMGICONTAINER(_to) \ |
313 | | NS_IMETHOD GetWidth(int32_t *aWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ |
314 | | NS_IMETHOD GetHeight(int32_t *aHeight) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ |
315 | | NS_IMETHOD GetIntrinsicSize(nsSize * aIntrinsicSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntrinsicSize(aIntrinsicSize); } \ |
316 | | NS_IMETHOD GetIntrinsicRatio(nsSize * aIntrinsicRatio) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntrinsicRatio(aIntrinsicRatio); } \ |
317 | | virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override; \ |
318 | | NS_IMETHOD GetType(uint16_t *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \ |
319 | | NS_IMETHOD GetAnimated(bool *aAnimated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimated(aAnimated); } \ |
320 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override; \ |
321 | | NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override; \ |
322 | | NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override; \ |
323 | | NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override; \ |
324 | | NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager * aManager, uint32_t aFlags) override; \ |
325 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) GetImageContainerAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, mozilla::layers::ImageContainer * * aOutContainer) override; \ |
326 | | NS_IMETHOD_(bool) IsImageContainerAvailableAtSize(mozilla::layers::LayerManager * aManager, const nsIntSize & aSize, uint32_t aFlags) override; \ |
327 | | NS_IMETHOD_(mozilla::image::ImgDrawResult) Draw(gfxContext * aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override; \ |
328 | | NS_IMETHOD StartDecoding(uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDecoding(aFlags); } \ |
329 | | NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override; \ |
330 | | NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestDecodeForSize(aSize, aFlags); } \ |
331 | | NS_IMETHOD LockImage(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LockImage(); } \ |
332 | | NS_IMETHOD UnlockImage(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnlockImage(); } \ |
333 | | NS_IMETHOD RequestDiscard(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestDiscard(); } \ |
334 | | NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override; \ |
335 | | NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimationMode(aAnimationMode); } \ |
336 | | NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAnimationMode(aAnimationMode); } \ |
337 | | NS_IMETHOD ResetAnimation(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetAnimation(); } \ |
338 | | NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override; \ |
339 | | NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override; \ |
340 | | NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override; \ |
341 | | NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override; \ |
342 | | NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override; \ |
343 | | virtual already_AddRefed<imgIContainer> Unwrap(void) override; \ |
344 | | NS_IMETHOD_(void) PropagateUseCounters(nsIDocument * aDocument) override; \ |
345 | | |
346 | | |
347 | | #endif /* __gen_imgIContainer_h__ */ |