Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
mtl
MtlBuffer.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 skgpu_graphite_MtlBuffer_DEFINED
9
#define skgpu_graphite_MtlBuffer_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/gpu/graphite/mtl/MtlGraphiteTypes.h
"
13
#include "
src/gpu/graphite/Buffer.h
"
14
15
#import <Metal/Metal.h>
16
17
namespace
skgpu::graphite
{
18
class
MtlSharedContext;
19
20
class
MtlBuffer
:
public
Buffer
{
21
public
:
22
static
sk_sp<Buffer>
Make
(
const
MtlSharedContext
*,
size_t
size
,
BufferType
type
,
AccessPattern
);
23
24
id<MTLBuffer>
mtlBuffer
()
const
{
return
fBuffer.get(); }
25
26
private
:
27
MtlBuffer
(
const
MtlSharedContext
*,
size_t
size
, sk_cfp<id<MTLBuffer>>);
28
29
void
onMap()
override
;
30
void
onUnmap()
override
;
31
32
void
freeGpuData()
override
;
33
34
void
setBackendLabel(
char
const
* label)
override
;
35
36
sk_cfp<id<MTLBuffer>> fBuffer;
37
};
38
39
}
// namespace skgpu::graphite
40
41
#endif
// skgpu_graphite_MtlBuffer_DEFINED
42
Buffer.h
MtlGraphiteTypes.h
SkRefCnt.h
type
GLenum type
Definition:
blit_command_gles.cc:126
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::Buffer
Definition:
Buffer.h:17
skgpu::graphite::Buffer::size
size_t size() const
Definition:
Buffer.h:19
skgpu::graphite::MtlBuffer
Definition:
MtlBuffer.h:20
skgpu::graphite::MtlBuffer::mtlBuffer
id< MTLBuffer > mtlBuffer() const
Definition:
MtlBuffer.h:24
skgpu::graphite::MtlBuffer::Make
static sk_sp< Buffer > Make(const MtlSharedContext *, size_t size, BufferType type, AccessPattern)
Definition:
MtlBuffer.mm:15
skgpu::graphite::MtlSharedContext
Definition:
MtlSharedContext.h:27
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::graphite::BufferType
BufferType
Definition:
ResourceTypes.h:57
skgpu::graphite::AccessPattern
AccessPattern
Definition:
ResourceTypes.h:101
Generated on Sun Jun 23 2024 21:56:27 for Flutter Engine by
1.9.4