Leon Scroggins III | 33deb7e | 2017-06-07 12:31:51 -0400 | [diff] [blame] | 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 | namespace SkCodecAnimation { |
| 12 | /** |
| 13 | * This specifies how the next frame is based on this frame. |
| 14 | * |
| 15 | * Names are based on the GIF 89a spec. |
| 16 | * |
| 17 | * The numbers correspond to values in a GIF. |
| 18 | */ |
| 19 | enum class DisposalMethod { |
| 20 | /** |
| 21 | * The next frame should be drawn on top of this one. |
| 22 | * |
| 23 | * In a GIF, a value of 0 (not specified) is also treated as Keep. |
| 24 | */ |
| 25 | kKeep = 1, |
| 26 | |
| 27 | /** |
| 28 | * Similar to Keep, except the area inside this frame's rectangle |
| 29 | * should be cleared to the BackGround color (transparent) before |
| 30 | * drawing the next frame. |
| 31 | */ |
| 32 | kRestoreBGColor = 2, |
| 33 | |
| 34 | /** |
| 35 | * The next frame should be drawn on top of the previous frame - i.e. |
| 36 | * disregarding this one. |
| 37 | * |
| 38 | * In a GIF, a value of 4 is also treated as RestorePrevious. |
| 39 | */ |
| 40 | kRestorePrevious = 3, |
| 41 | }; |
Nico Weber | 5257816 | 2019-02-11 09:12:25 -0500 | [diff] [blame] | 42 | } |
Leon Scroggins III | 33deb7e | 2017-06-07 12:31:51 -0400 | [diff] [blame] | 43 | #endif // SkCodecAnimation_DEFINED |