Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
d3d
GrD3DPipeline.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 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 GrD3DPipeline_DEFINED
9
#define GrD3DPipeline_DEFINED
10
11
#include "
include/gpu/d3d/GrD3DTypes.h
"
12
#include "
src/gpu/ganesh/GrManagedResource.h
"
13
14
class
GrD3DPipeline
:
public
GrManagedResource
{
15
public
:
16
static
sk_sp<GrD3DPipeline>
Make
(
gr_cp<ID3D12PipelineState>
pipelineState) {
17
if
(!pipelineState) {
18
return
nullptr
;
19
}
20
return
sk_sp<GrD3DPipeline>
(
new
GrD3DPipeline
(std::move(pipelineState)));
21
}
22
#ifdef SK_TRACE_MANAGED_RESOURCES
23
/** Output a human-readable dump of this resource's information
24
*/
25
void
dumpInfo()
const override
{
26
SkDebugf
(
"GrD3DPipeline: %p (%d refs)\n"
, fPipelineState.
get
(), this->getRefCnt());
27
}
28
#endif
29
30
// This will be called right before this class is destroyed and there is no reason to explicitly
31
// release the fPipelineState cause the gr_cp will handle that in the dtor.
32
void
freeGPUData
()
const override
{}
33
34
ID3D12PipelineState*
d3dPipelineState
()
const
{
return
fPipelineState.
get
(); }
35
36
private
:
37
GrD3DPipeline
(
gr_cp<ID3D12PipelineState>
pipelineState)
38
: fPipelineState(
std
::move(pipelineState)) {
39
}
40
41
gr_cp<ID3D12PipelineState>
fPipelineState;
42
43
using
INHERITED =
GrManagedResource
;
44
};
45
46
#endif
GrD3DTypes.h
GrManagedResource.h
SkDebugf
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
GrD3DPipeline
Definition:
GrD3DPipeline.h:14
GrD3DPipeline::d3dPipelineState
ID3D12PipelineState * d3dPipelineState() const
Definition:
GrD3DPipeline.h:34
GrD3DPipeline::Make
static sk_sp< GrD3DPipeline > Make(gr_cp< ID3D12PipelineState > pipelineState)
Definition:
GrD3DPipeline.h:16
GrD3DPipeline::freeGPUData
void freeGPUData() const override
Definition:
GrD3DPipeline.h:32
GrManagedResource
Definition:
GrManagedResource.h:39
GrManagedResource::GrManagedResource
GrManagedResource()
Definition:
GrManagedResource.h:80
gr_cp< ID3D12PipelineState >
gr_cp::get
T * get() const
Definition:
GrD3DTypes.h:108
sk_sp< GrD3DPipeline >
std
Definition:
ref_ptr.h:256
Generated on Sun Jun 23 2024 21:56:17 for Flutter Engine by
1.9.4