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

Side by Side Diff: src/codec/SkCodecAnimation.h

Issue 2045293002: Add support for multiple frames in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Small cleanups Created 4 years, 2 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
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkCodecAnimation_DEFINED
9 #define SkCodecAnimation_DEFINED
10
11 #include "SkCodec.h"
12 #include "SkRect.h"
13
14 class SkCodecAnimation {
15 public:
16 /**
17 * This specifies how the next frame is based on this frame.
18 *
19 * Names are based on the GIF 89a spec.
20 *
21 * The numbers correspond to values in a GIF.
22 */
23 enum DisposalMethod {
24 /**
25 * The next frame should be drawn on top of this one.
26 *
27 * In a GIF, a value of 0 (not specified) is also treated as Keep.
28 */
29 Keep_DisposalMethod = 1,
30
31 /**
32 * Similar to Keep, except the area inside this frame's rectangle
33 * should be cleared to the BackGround color (transparent) before
34 * drawing the next frame.
35 */
36 RestoreBGColor_DisposalMethod = 2,
37
38 /**
39 * The next frame should be drawn on top of the previous frame - i.e.
40 * disregarding this one.
41 *
42 * In a GIF, a value of 4 is also treated as RestorePrevious.
43 */
44 RestorePrevious_DisposalMethod = 3,
45 };
46
47 struct FrameInfo : public SkCodec::FrameInfo {
48 DisposalMethod fDisposalMethod;
49
50 // The subset of the bounds that this frame describes.
51 SkIRect fFrameRect;
52 };
53 private:
54 SkCodecAnimation();
55 };
56 #endif // SkCodecAnimation_DEFINED
OLDNEW
« include/codec/SkCodec.h ('K') | « include/codec/SkCodec.h ('k') | src/codec/SkGifCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698