chromium/gpu/command_buffer/service/graphite_cache_controller.cc

// 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.

#include "gpu/command_buffer/service/graphite_cache_controller.h"

#include "base/functional/callback_helpers.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "gpu/command_buffer/service/graphite_image_provider.h"
#include "skia/buildflags.h"
#include "third_party/skia/include/gpu/graphite/Context.h"
#include "third_party/skia/include/gpu/graphite/Recorder.h"

#if BUILDFLAG(SKIA_USE_DAWN)
#include "gpu/command_buffer/service/dawn_context_provider.h"
#endif

namespace gpu::raster {
namespace {
// Any resources not used in the last 5 seconds should be purged.
constexpr base::TimeDelta kResourceNotUsedSinceDelay =;

// All unused resources should be purged after an idle time delay of 5 seconds.
constexpr base::TimeDelta kCleanUpAllResourcesDelay =;
}

GraphiteCacheController::GraphiteCacheController(
    skgpu::graphite::Recorder* recorder,
    skgpu::graphite::Context* context,
    DawnContextProvider* dawn_context_provider)
    :{}

GraphiteCacheController::~GraphiteCacheController() {}

void GraphiteCacheController::ScheduleCleanup() {}

void GraphiteCacheController::CleanUpScratchResources() {}

void GraphiteCacheController::CleanUpAllResources() {}

}  // namespace gpu::raster