Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
graphite
GraphicsPipelineDesc.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021 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
8
#ifndef skgpu_graphite_GraphicsPipelineDesc_DEFINED
9
#define skgpu_graphite_GraphicsPipelineDesc_DEFINED
10
11
#include "
src/gpu/graphite/Renderer.h
"
12
#include "
src/gpu/graphite/UniquePaintParamsID.h
"
13
14
namespace
skgpu::graphite
{
15
16
/**
17
* GraphicsPipelineDesc represents the state needed to create a backend specific GraphicsPipeline,
18
* minus the target-specific properties that can be inferred from the DrawPass and RenderPassTask.
19
*/
20
class
GraphicsPipelineDesc
{
21
public
:
22
GraphicsPipelineDesc
() : fRenderStepID(0), fPaintID(
UniquePaintParamsID
::InvalidID()) {}
23
GraphicsPipelineDesc
(
const
RenderStep
* renderStep,
UniquePaintParamsID
paintID)
24
: fRenderStepID(renderStep->uniqueID())
25
, fPaintID(paintID) {}
26
27
bool
operator==
(
const
GraphicsPipelineDesc
& that)
const
{
28
return
fRenderStepID == that.fRenderStepID && fPaintID == that.fPaintID;
29
}
30
31
bool
operator!=
(
const
GraphicsPipelineDesc
& other)
const
{
32
return
!(*
this
== other);
33
}
34
35
// Describes the geometric portion of the pipeline's program and the pipeline's fixed state
36
// (except for renderpass-level state that will never change between draws).
37
uint32_t
renderStepID
()
const
{
return
fRenderStepID; }
38
// UniqueID of the required PaintParams
39
UniquePaintParamsID
paintParamsID
()
const
{
return
fPaintID; }
40
41
private
:
42
// Each RenderStep defines a fixed set of attributes and rasterization state, as well as the
43
// shader fragments that control the geometry and coverage calculations. The RenderStep's shader
44
// is combined with the rest of the shader generated from the PaintParams. Because each
45
// RenderStep is fixed, its pointer can be used as a proxy for everything that it specifies in
46
// the GraphicsPipeline.
47
uint32_t fRenderStepID;
48
UniquePaintParamsID
fPaintID;
49
};
50
51
}
// namespace skgpu::graphite
52
53
#endif
// skgpu_graphite_GraphicsPipelineDesc_DEFINED
Renderer.h
UniquePaintParamsID.h
skgpu::graphite::GraphicsPipelineDesc
Definition
GraphicsPipelineDesc.h:20
skgpu::graphite::GraphicsPipelineDesc::GraphicsPipelineDesc
GraphicsPipelineDesc()
Definition
GraphicsPipelineDesc.h:22
skgpu::graphite::GraphicsPipelineDesc::paintParamsID
UniquePaintParamsID paintParamsID() const
Definition
GraphicsPipelineDesc.h:39
skgpu::graphite::GraphicsPipelineDesc::renderStepID
uint32_t renderStepID() const
Definition
GraphicsPipelineDesc.h:37
skgpu::graphite::GraphicsPipelineDesc::GraphicsPipelineDesc
GraphicsPipelineDesc(const RenderStep *renderStep, UniquePaintParamsID paintID)
Definition
GraphicsPipelineDesc.h:23
skgpu::graphite::GraphicsPipelineDesc::operator!=
bool operator!=(const GraphicsPipelineDesc &other) const
Definition
GraphicsPipelineDesc.h:31
skgpu::graphite::GraphicsPipelineDesc::operator==
bool operator==(const GraphicsPipelineDesc &that) const
Definition
GraphicsPipelineDesc.h:27
skgpu::graphite::RenderStep
Definition
Renderer.h:68
skgpu::graphite::UniquePaintParamsID
Definition
UniquePaintParamsID.h:17
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
Generated on Fri Apr 26 2024 06:17:18 for Flutter Engine by
1.9.8