Bug 1523562 [wpt PR 14847] - Make named constructors' |prototype|s have the right...
[gecko.git] / image / AnimationParams.h
blobb10d84f85c0896113044a646491f8313545ca5d0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_image_AnimationParams_h
8 #define mozilla_image_AnimationParams_h
10 #include <stdint.h>
11 #include "mozilla/gfx/Rect.h"
12 #include "FrameTimeout.h"
14 namespace mozilla {
15 namespace image {
17 enum class BlendMethod : int8_t {
18 // All color components of the frame, including alpha, overwrite the current
19 // contents of the frame's output buffer region.
20 SOURCE,
22 // The frame should be composited onto the output buffer based on its alpha,
23 // using a simple OVER operation.
24 OVER
27 enum class DisposalMethod : int8_t {
28 CLEAR_ALL = -1, // Clear the whole image, revealing what's underneath.
29 NOT_SPECIFIED, // Leave the frame and let the new frame draw on top.
30 KEEP, // Leave the frame and let the new frame draw on top.
31 CLEAR, // Clear the frame's area, revealing what's underneath.
32 RESTORE_PREVIOUS // Restore the previous (composited) frame.
35 struct AnimationParams {
36 gfx::IntRect mBlendRect;
37 FrameTimeout mTimeout;
38 uint32_t mFrameNum;
39 BlendMethod mBlendMethod;
40 DisposalMethod mDisposalMethod;
43 } // namespace image
44 } // namespace mozilla
46 #endif // mozilla_image_AnimationParams_h