Flutter Engine
The Flutter Engine
ComputePipelineDesc.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
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#ifndef skgpu_graphite_ComputePipelineDesc_DEFINED
8#define skgpu_graphite_ComputePipelineDesc_DEFINED
9
11
12#include <functional>
13
14namespace skgpu::graphite {
15
16/**
17 * ComputePipelineDesc represents the state needed to create a backend specific ComputePipeline.
18 */
20public:
21 // `computeStep` must outlive this `ComputePipelineDesc`.
22 explicit ComputePipelineDesc(const ComputeStep* computeStep) : fComputeStep(computeStep) {}
23
24 bool operator==(const ComputePipelineDesc& that) const {
25 return fComputeStep->uniqueID() == that.fComputeStep->uniqueID();
26 }
27
28 const ComputeStep* computeStep() const { return fComputeStep; }
29
30 uint32_t uniqueID() const { return fComputeStep->uniqueID(); }
31
32private:
33 const ComputeStep* fComputeStep;
34};
35
36} // namespace skgpu::graphite
37
38#endif // skgpu_graphite_ComputePipelineDesc_DEFINED
const ComputeStep * computeStep() const
ComputePipelineDesc(const ComputeStep *computeStep)
bool operator==(const ComputePipelineDesc &that) const
uint32_t uniqueID() const
Definition: ComputeStep.h:241