SkCodecAnimation.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef SkCodecAnimation_DEFINED
  8. #define SkCodecAnimation_DEFINED
  9. namespace SkCodecAnimation {
  10. /**
  11. * This specifies how the next frame is based on this frame.
  12. *
  13. * Names are based on the GIF 89a spec.
  14. *
  15. * The numbers correspond to values in a GIF.
  16. */
  17. enum class DisposalMethod {
  18. /**
  19. * The next frame should be drawn on top of this one.
  20. *
  21. * In a GIF, a value of 0 (not specified) is also treated as Keep.
  22. */
  23. kKeep = 1,
  24. /**
  25. * Similar to Keep, except the area inside this frame's rectangle
  26. * should be cleared to the BackGround color (transparent) before
  27. * drawing the next frame.
  28. */
  29. kRestoreBGColor = 2,
  30. /**
  31. * The next frame should be drawn on top of the previous frame - i.e.
  32. * disregarding this one.
  33. *
  34. * In a GIF, a value of 4 is also treated as RestorePrevious.
  35. */
  36. kRestorePrevious = 3,
  37. };
  38. };
  39. #endif // SkCodecAnimation_DEFINED