Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
graphite
PublicPrecompile.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
8
#ifndef skgpu_graphite_PublicPrecompile_DEFINED
9
#define skgpu_graphite_PublicPrecompile_DEFINED
10
11
#include "
include/gpu/graphite/GraphiteTypes.h
"
12
13
// TODO: this header should be moved to include/gpu/graphite once the precompilation API
14
// is made public
15
namespace
skgpu::graphite
{
16
17
class
Context
;
18
class
GraphicsPipelineDesc;
19
class
PaintOptions;
20
struct
RenderPassDesc;
21
class
RuntimeEffectDictionary;
22
23
/**
24
* Precompilation allows clients to create pipelines ahead of time based on what they expect
25
* to draw. This can reduce performance hitches, due to inline compilation, during the actual
26
* drawing. Graphite will always be able to perform an inline compilation if some SkPaint
27
* combination was omitted from precompilation.
28
*
29
* @param context the Context to which the actual draws will be submitted
30
* @param paintOptions captures a set of SkPaints that will be drawn
31
* @param drawTypes communicates which primitives those paints will be drawn with
32
*/
33
void
Precompile
(
Context
*,
const
PaintOptions&,
DrawTypeFlags
=
kMostCommon
);
34
35
/*
36
* TODO: Rather than passing in a pipelineDesc and renderPassDesc we need to add an
37
* opaque serializable object that contains the same information.
38
*/
39
bool
Precompile
(
Context
*,
40
RuntimeEffectDictionary* rteDict,
41
const
GraphicsPipelineDesc& pipelineDesc,
42
const
RenderPassDesc& renderPassDesc);
43
44
}
// namespace skgpu::graphite
45
46
#endif
// skgpu_graphite_PublicPrecompile_DEFINED
GraphiteTypes.h
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
skgpu::graphite::Precompile
bool Precompile(Context *context, RuntimeEffectDictionary *rteDict, const GraphicsPipelineDesc &pipelineDesc, const RenderPassDesc &renderPassDesc)
Definition
PublicPrecompile.cpp:81
skgpu::graphite::DrawTypeFlags
DrawTypeFlags
Definition
GraphiteTypes.h:110
skgpu::graphite::kMostCommon
@ kMostCommon
Definition
GraphiteTypes.h:133
Context
Definition
SerialProcsTest.cpp:126
Generated on Fri Apr 26 2024 06:17:19 for Flutter Engine by
1.9.8