chromium/components/viz/service/layers/layer_context_impl.h

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

#ifndef COMPONENTS_VIZ_SERVICE_LAYERS_LAYER_CONTEXT_IMPL_H_
#define COMPONENTS_VIZ_SERVICE_LAYERS_LAYER_CONTEXT_IMPL_H_

#include <memory>
#include <string>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/types/expected.h"
#include "cc/animation/animation_host.h"
#include "cc/layers/tile_display_layer_impl.h"
#include "cc/trees/layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "components/viz/common/resources/returned_resource.h"
#include "components/viz/common/resources/transferable_resource.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "services/viz/public/mojom/compositing/layer_context.mojom.h"

namespace cc {
class RenderingStatsInstrumentation;
}  // namespace cc

namespace viz {

struct BeginFrameArgs;
class CompositorFrameSinkSupport;

// Implements the Viz LayerContext API backed by a LayerTreeHostImpl. This
// provides the service backend for a client-side VizLayerContext.
class LayerContextImpl : public cc::LayerTreeHostImplClient,
                         public cc::LayerTreeFrameSink,
                         public cc::TileDisplayLayerImpl::Client,
                         public mojom::LayerContext {};

}  // namespace viz

#endif  // COMPONENTS_VIZ_SERVICE_LAYERS_LAYER_CONTEXT_IMPL_H_