Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
mtl
GrMtlPipeline.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 GrMtlPipeline_DEFINED
9
#define GrMtlPipeline_DEFINED
10
11
#include "
src/gpu/ganesh/GrManagedResource.h
"
12
13
#import <Metal/Metal.h>
14
15
/**
16
* Wraps a MTLRenderPipelineState object
17
*/
18
class
GrMtlRenderPipeline
:
public
GrManagedResource
{
19
public
:
20
static
sk_sp<GrMtlRenderPipeline>
Make
(id<MTLRenderPipelineState> pso) {
21
return
sk_sp<GrMtlRenderPipeline>
(
new
GrMtlRenderPipeline
(pso));
22
}
23
#ifdef SK_TRACE_MANAGED_RESOURCES
24
/** output a human-readable dump of this resource's information
25
*/
26
void
dumpInfo()
const override
{
27
SkDebugf
(
"GrMtlRenderPipeline: %p (%ld refs)\n"
, fPipelineState,
28
CFGetRetainCount((CFTypeRef)fPipelineState));
29
}
30
#endif
31
32
void
freeGPUData
()
const override
{
33
fPipelineState = nil;
34
}
35
36
id<MTLRenderPipelineState>
mtlPipelineState
()
const
{
return
fPipelineState; }
37
38
private
:
39
GrMtlRenderPipeline
(id<MTLRenderPipelineState> pso)
40
:
GrManagedResource
()
41
, fPipelineState(pso) {
42
}
43
44
mutable
id<MTLRenderPipelineState> fPipelineState;
45
};
46
47
#endif
GrManagedResource.h
SkDebugf
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
GrManagedResource
Definition
GrManagedResource.h:39
GrMtlRenderPipeline
Definition
GrMtlPipeline.h:18
GrMtlRenderPipeline::Make
static sk_sp< GrMtlRenderPipeline > Make(id< MTLRenderPipelineState > pso)
Definition
GrMtlPipeline.h:20
GrMtlRenderPipeline::mtlPipelineState
id< MTLRenderPipelineState > mtlPipelineState() const
Definition
GrMtlPipeline.h:36
GrMtlRenderPipeline::freeGPUData
void freeGPUData() const override
Definition
GrMtlPipeline.h:32
sk_sp
Definition
SkRefCnt.h:220
Generated on Fri Apr 26 2024 06:17:07 for Flutter Engine by
1.9.8