Flutter Engine
The Flutter Engine
GrRenderTaskCluster.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrRenderTaskCluster_DEFINED
9#define GrRenderTaskCluster_DEFINED
10
12#include "include/core/SkSpan.h"
14
15class GrRenderTask;
16
17// Take a topologically-sorted DAG and cluster the tasks together while maintaining the
18// dependencies.
19//
20// If no clustering is possible the llist is populated with the nodes in the original order and
21// false is returned.
22// Otherwise, returns true and populates the provided llist as such:
23// - Contains the same set of tasks as `input`.
24// - Obeys the dependency rules in `input`.
25// - Places tasks with the same target adjacent to each other.
26// - Tasks with multiple targets act as reordering barriers for all their targets.
29
30#endif
bool GrClusterRenderTasks(SkSpan< const sk_sp< GrRenderTask > > input, SkTInternalLList< GrRenderTask > *llist)