Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
MtlResourceProvider.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_MtlResourceProvider_DEFINED
9#define skgpu_graphite_MtlResourceProvider_DEFINED
10
11#include "src/core/SkTHash.h"
15
16#import <Metal/Metal.h>
17
18namespace skgpu::graphite {
19
20class CommandBuffer;
21class MtlSharedContext;
22
24public:
27 uint32_t recorderID,
28 size_t resourceBudget);
30
32
34
35private:
36 const MtlSharedContext* mtlSharedContext();
37
40 const RenderPassDesc&) override;
42
44 sk_sp<Buffer> createBuffer(size_t size,
47 std::string_view label) override;
49
50 BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo&) override;
51 void onDeleteBackendTexture(const BackendTexture&) override;
52
53 sk_cfp<id<MTLDepthStencilState>> findOrCreateCompatibleDepthStencilState(
55
57 fDepthStencilStates;
59};
60
61} // namespace skgpu::graphite
62
63#endif // skgpu_graphite_MtlResourceProvider_DEFINED
sk_sp< GraphicsPipeline > createGraphicsPipeline(const RuntimeEffectDictionary *, const GraphicsPipelineDesc &, const RenderPassDesc &) override
sk_sp< Buffer > createBuffer(size_t size, BufferType type, AccessPattern, std::string_view label) override
sk_sp< Texture > createTexture(SkISize, const TextureInfo &, skgpu::Budgeted) override
sk_sp< Sampler > createSampler(const SamplerDesc &) override
void onDeleteBackendTexture(const BackendTexture &) override
sk_sp< MtlGraphicsPipeline > findOrCreateLoadMSAAPipeline(const RenderPassDesc &)
BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo &) override
sk_sp< Texture > createWrappedTexture(const BackendTexture &) override
sk_sp< ComputePipeline > createComputePipeline(const ComputePipelineDesc &) override
Budgeted
Definition GpuTypes.h:35