chromium/components/viz/service/frame_sinks/surface_resource_holder.h

// Copyright 2014 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_FRAME_SINKS_SURFACE_RESOURCE_HOLDER_H_
#define COMPONENTS_VIZ_SERVICE_FRAME_SINKS_SURFACE_RESOURCE_HOLDER_H_

#include <unordered_map>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "components/viz/common/resources/resource_id.h"
#include "components/viz/common/resources/returned_resource.h"
#include "components/viz/common/resources/transferable_resource.h"
#include "components/viz/service/viz_service_export.h"

namespace viz {
class SurfaceResourceHolderClient;

// ReservedResourceDelegate is an interface for tracking the lifetime of
// resources. Code which submits resources that are managed fully on the viz
// side (with resource IDs >= kVizReservedRangeStartId) should implement this.
class ReservedResourceDelegate {};

// A SurfaceResourceHolder manages the lifetime of resources submitted by a
// particular SurfaceFactory. Each resource is held by the service until
// it is no longer referenced by any pending frames or by any
// resource providers.
class VIZ_SERVICE_EXPORT SurfaceResourceHolder {};

}  // namespace viz

#endif  // COMPONENTS_VIZ_SERVICE_FRAME_SINKS_SURFACE_RESOURCE_HOLDER_H_