#include "components/viz/service/surfaces/surface_allocation_group.h"
#include <numeric>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_manager.h"
namespace viz {
SurfaceAllocationGroup::SurfaceAllocationGroup(
SurfaceManager* surface_manager,
const FrameSinkId& submitter,
const base::UnguessableToken& embed_token)
: … { … }
SurfaceAllocationGroup::~SurfaceAllocationGroup() { … }
bool SurfaceAllocationGroup::IsReadyToDestroy() const { … }
void SurfaceAllocationGroup::RegisterSurface(Surface* surface) { … }
void SurfaceAllocationGroup::UnregisterSurface(Surface* surface) { … }
void SurfaceAllocationGroup::RegisterBlockedEmbedder(
Surface* surface,
const SurfaceId& activation_dependency) { … }
void SurfaceAllocationGroup::UnregisterBlockedEmbedder(Surface* surface,
bool did_activate) { … }
bool SurfaceAllocationGroup::HasBlockedEmbedder() const { … }
void SurfaceAllocationGroup::RegisterActiveEmbedder(Surface* surface) { … }
void SurfaceAllocationGroup::UnregisterActiveEmbedder(Surface* surface) { … }
void SurfaceAllocationGroup::UpdateLastActiveReferenceAndMaybeActivate(
const SurfaceId& surface_id) { … }
void SurfaceAllocationGroup::UpdateLastPendingReferenceAndMaybeActivate(
const SurfaceId& surface_id) { … }
const SurfaceId& SurfaceAllocationGroup::GetLastActiveReference() { … }
const SurfaceId& SurfaceAllocationGroup::GetLastReference() { … }
Surface* SurfaceAllocationGroup::FindLatestActiveSurfaceInRange(
const SurfaceRange& range) const { … }
void SurfaceAllocationGroup::TakeAggregatedLatencyInfoUpTo(
Surface* surface,
std::vector<ui::LatencyInfo>* out) { … }
void SurfaceAllocationGroup::OnFirstSurfaceActivation(Surface* surface) { … }
void SurfaceAllocationGroup::WillNotRegisterNewSurfaces() { … }
void SurfaceAllocationGroup::AckLastestActiveUnAckedFrame() { … }
std::vector<raw_ptr<Surface, VectorExperimental>>::const_iterator
SurfaceAllocationGroup::FindLatestSurfaceUpTo(
const SurfaceId& surface_id) const { … }
std::vector<raw_ptr<Surface, VectorExperimental>>::const_iterator
SurfaceAllocationGroup::FindLatestActiveSurfaceUpTo(
const SurfaceId& surface_id) const { … }
void SurfaceAllocationGroup::MaybeMarkForDestruction() { … }
void SurfaceAllocationGroup::UpdateLastReferenceAndMaybeActivate(
const SurfaceId& surface_id) { … }
}