author Matt Woodrow <>
Sun, 04 Nov 2018 20:35:36 +0000
changeset 444341 d7cb17082a13ebeb1c4ba9b5907bc0bf18cc209d
parent 420272 259ee94de92ca9c586cfa02cb92db331aace64d1
child 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1503730 - Add visual indicator for when WebRender frames record a CONTENT_FRAME_TIME of >200. r=sotaro MozReview-Commit-ID: KdRf3WClD6M Differential Revision:

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_image_AnimationParams_h
#define mozilla_image_AnimationParams_h

#include <stdint.h>
#include "mozilla/gfx/Rect.h"
#include "FrameTimeout.h"

namespace mozilla {
namespace image {

enum class BlendMethod : int8_t {
  // All color components of the frame, including alpha, overwrite the current
  // contents of the frame's output buffer region.

  // The frame should be composited onto the output buffer based on its alpha,
  // using a simple OVER operation.

enum class DisposalMethod : int8_t {
  CLEAR_ALL = -1,  // Clear the whole image, revealing what's underneath.
  NOT_SPECIFIED,   // Leave the frame and let the new frame draw on top.
  KEEP,            // Leave the frame and let the new frame draw on top.
  CLEAR,           // Clear the frame's area, revealing what's underneath.
  RESTORE_PREVIOUS // Restore the previous (composited) frame.

struct AnimationParams
  gfx::IntRect mBlendRect;
  FrameTimeout mTimeout;
  uint32_t mFrameNum;
  BlendMethod mBlendMethod;
  DisposalMethod mDisposalMethod;

} // namespace image
} // namespace mozilla

#endif // mozilla_image_AnimationParams_h