// Copyright 2019 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_SURFACES_SURFACE_ALLOCATION_GROUP_H_ #define COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_ALLOCATION_GROUP_H_ #include <vector> #include "base/containers/flat_set.h" #include "base/memory/raw_ptr.h" #include "base/unguessable_token.h" #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/surface_range.h" #include "components/viz/service/viz_service_export.h" #include "ui/latency/latency_info.h" namespace viz { class Surface; class SurfaceManager; // This class keeps track of the LocalSurfaceIds that were generated using the // same ParentLocalSurfaceIdAllocator (i.e. have the same embed token). // A SurfaceAllocationGroup is created when: // - A surface is created with an embed token that was never seen before, OR // - A surface embeds another surface that has an embed token that was never // seen before. // Once all the surfaces in the allocation group and all of the embedders are // unregistered, the allocation group will be garbage-collected. class VIZ_SERVICE_EXPORT SurfaceAllocationGroup { … }; } // namespace viz #endif // COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_ALLOCATION_GROUP_H_