#include "cc/raster/task_graph_work_queue.h"
#include <stddef.h>
#include <stdint.h>
#include <map>
#include <unordered_map>
#include <utility>
#include "base/containers/contains.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_id_helper.h"
#include "base/trace_event/typed_macros.h"
namespace cc {
namespace {
bool CompareTaskPriority(const TaskGraphWorkQueue::PrioritizedTask& a,
const TaskGraphWorkQueue::PrioritizedTask& b) { … }
class CompareTaskNamespacePriority { … };
class DependentIterator { … };
}
TaskGraphWorkQueue::TaskNamespace::TaskNamespace() = default;
TaskGraphWorkQueue::TaskNamespace::TaskNamespace(TaskNamespace&& other) =
default;
TaskGraphWorkQueue::TaskNamespace::~TaskNamespace() = default;
TaskGraphWorkQueue::TaskGraphWorkQueue() : … { … }
TaskGraphWorkQueue::~TaskGraphWorkQueue() = default;
TaskGraphWorkQueue::PrioritizedTask::PrioritizedTask(
scoped_refptr<Task> task,
TaskNamespace* task_namespace,
uint16_t category,
uint16_t priority)
: … { … }
TaskGraphWorkQueue::PrioritizedTask::PrioritizedTask(PrioritizedTask&& other) =
default;
TaskGraphWorkQueue::PrioritizedTask::~PrioritizedTask() = default;
NamespaceToken TaskGraphWorkQueue::GenerateNamespaceToken() { … }
void TaskGraphWorkQueue::ScheduleTasks(NamespaceToken token, TaskGraph* graph) { … }
TaskGraphWorkQueue::PrioritizedTask TaskGraphWorkQueue::GetNextTaskToRun(
uint16_t category) { … }
void TaskGraphWorkQueue::CompleteTask(PrioritizedTask completed_task) { … }
void TaskGraphWorkQueue::CollectCompletedTasks(NamespaceToken token,
Task::Vector* completed_tasks) { … }
bool TaskGraphWorkQueue::DependencyMismatch(const TaskGraph* graph) { … }
}