Flutter Engine
The Flutter Engine
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
33private:
34 const MtlSharedContext* mtlSharedContext();
35
36 sk_sp<GraphicsPipeline> createGraphicsPipeline(const RuntimeEffectDictionary*,
38 const RenderPassDesc&) override;
39 sk_sp<ComputePipeline> createComputePipeline(const ComputePipelineDesc&) override;
40
41 sk_sp<Texture> createTexture(SkISize,
42 const TextureInfo&,
43 skgpu::Budgeted) override;
44 sk_sp<Texture> onCreateWrappedTexture(const BackendTexture&) override;
45 sk_sp<Buffer> createBuffer(size_t size, BufferType type, AccessPattern) override;
46 sk_sp<Sampler> createSampler(const SamplerDesc&) override;
47
48 BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo&) override;
49 void onDeleteBackendTexture(const BackendTexture&) override;
50
51 sk_cfp<id<MTLDepthStencilState>> findOrCreateCompatibleDepthStencilState(
53
55 fDepthStencilStates;
57};
58
59} // namespace skgpu::graphite
60
61#endif // skgpu_graphite_MtlResourceProvider_DEFINED
GLenum type
sk_sp< MtlGraphicsPipeline > findOrCreateLoadMSAAPipeline(const RenderPassDesc &)
MtlResourceProvider(SharedContext *sharedContext, SingleOwner *, uint32_t recorderID, size_t resourceBudget)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
Budgeted
Definition: GpuTypes.h:35
Definition: SkSize.h:16