chromium/cc/trees/commit_state.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_TREES_COMMIT_STATE_H_
#define CC_TREES_COMMIT_STATE_H_

#include <memory>
#include <unordered_map>
#include <utility>
#include <vector>

#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/time/time.h"
#include "cc/benchmarks/micro_benchmark_impl.h"
#include "cc/cc_export.h"
#include "cc/debug/layer_tree_debug_state.h"
#include "cc/input/event_listener_properties.h"
#include "cc/input/layer_selection_bound.h"
#include "cc/input/overscroll_behavior.h"
#include "cc/input/page_scale_animation.h"
#include "cc/layers/layer.h"
#include "cc/layers/layer_list_iterator.h"
#include "cc/metrics/begin_main_frame_metrics.h"
#include "cc/metrics/event_metrics.h"
#include "cc/paint/paint_image.h"
#include "cc/resources/ui_resource_request.h"
#include "cc/trees/browser_controls_params.h"
#include "cc/trees/presentation_time_callback_buffer.h"
#include "cc/trees/render_frame_metadata.h"
#include "cc/trees/swap_promise.h"
#include "cc/trees/viewport_property_ids.h"
#include "cc/view_transition/view_transition_request.h"
#include "components/viz/common/surfaces/local_surface_id.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/delegated_ink_metadata.h"
#include "ui/gfx/display_color_spaces.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/vector2d_f.h"
#include "ui/gfx/overlay_transform.h"

namespace cc {
static constexpr int kInvalidSourceFrameNumber =;

// CommitState and ThreadUnsafeCommitState contain all of the information from
// LayerTreeHost that is needed to run compositor commit. CommitState is
// effectively POD; the compositor gets its own copy, which it may read or write
// without any concurrency issues.  ThreadUnsafeCommitState is shared data that
// is *not* copied to the compositor. Main thread code must take care not to
// modify anything reachable from ThreadUnsafeCommitState while commit is
// running on the impl thread, typically by adding calls to
// LayerTreeHost::WaitForCommitCompletion() before attempting to mutate state.

struct CC_EXPORT CommitState {};

struct CC_EXPORT ThreadUnsafeCommitState {};

struct CC_EXPORT CommitTimestamps {};

}  // namespace cc

#endif  // CC_TREES_COMMIT_STATE_H_