Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
MtlTexture.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_MtlTexture_DEFINED
9#define skgpu_graphite_MtlTexture_DEFINED
10
13
14#import <Metal/Metal.h>
15
16namespace skgpu::graphite {
17class MtlSharedContext;
18
19class MtlTexture : public Texture {
20public:
21 static sk_cfp<id<MTLTexture>> MakeMtlTexture(const MtlSharedContext*,
23 const TextureInfo&);
24
27 const TextureInfo&,
29
32 const TextureInfo&,
33 sk_cfp<id<MTLTexture>>);
34
35 ~MtlTexture() override {}
36
37 id<MTLTexture> mtlTexture() const { return fTexture.get(); }
38
39private:
42 const TextureInfo& info,
43 sk_cfp<id<MTLTexture>>,
46
47 void freeGpuData() override;
48
49 sk_cfp<id<MTLTexture>> fTexture;
50};
51
52} // namepsace skgpu::graphite
53
54#endif // skgpu_graphite_MtlTexture_DEFINED
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
static sk_sp< Texture > Make(const MtlSharedContext *, SkISize dimensions, const TextureInfo &, skgpu::Budgeted)
void freeGpuData() override
static sk_cfp< id< MTLTexture > > MakeMtlTexture(const MtlSharedContext *, SkISize dimensions, const TextureInfo &)
Definition MtlTexture.mm:20
static sk_sp< Texture > MakeWrapped(const MtlSharedContext *, SkISize dimensions, const TextureInfo &, sk_cfp< id< MTLTexture > >)
id< MTLTexture > mtlTexture() const
Definition MtlTexture.h:37
const SharedContext * sharedContext() const
Definition Resource.h:187
SkISize dimensions() const
Definition Texture.h:31
Budgeted
Definition GpuTypes.h:35