5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
8#include <Metal/Metal.h>
24 id<MTLCommandBuffer> buffer_ = nil;
25 id<MTLRenderCommandEncoder> encoder_ = nil;
26 MTLRenderPassDescriptor* desc_ = nil;
28 bool is_metal_trace_active_ =
false;
29 bool is_valid_ =
false;
33 mutable bool did_finish_encoding_ =
false;
38 size_t instance_count_ = 1u;
39 size_t base_vertex_ = 0u;
40 size_t vertex_count_ = 0u;
41 bool has_valid_pipeline_ =
false;
42 bool has_label_ =
false;
45 MTLIndexType index_type_ = {};
47 RenderPassMTL(std::shared_ptr<const Context> context,
49 id<MTLCommandBuffer>
buffer);
52 void ReserveCommands(
size_t command_count)
override {}
55 bool IsValid()
const override;
58 void OnSetLabel(std::string label)
override;
61 bool OnEncodeCommands(
const Context& context)
const override;
65 const std::shared_ptr<Pipeline<PipelineDescriptor>>& pipeline)
override;
68 void SetCommandLabel(std::string_view label)
override;
71 void SetStencilReference(uint32_t
value)
override;
74 void SetBaseVertex(uint64_t
value)
override;
77 void SetViewport(Viewport viewport)
override;
80 void SetScissor(
IRect scissor)
override;
83 void SetInstanceCount(
size_t count)
override;
94 const ShaderUniformSlot& slot,
95 const ShaderMetadata& metadata,
96 BufferView view)
override;
101 const ShaderUniformSlot& slot,
102 const std::shared_ptr<const ShaderMetadata>& metadata,
103 BufferView view)
override;
108 const SampledImageSlot& slot,
109 const ShaderMetadata& metadata,
110 std::shared_ptr<const Texture>
texture,
111 const std::unique_ptr<const Sampler>& sampler)
override;
113 RenderPassMTL(
const RenderPassMTL&) =
delete;
115 RenderPassMTL& operator=(
const RenderPassMTL&) =
delete;
~RenderPassMTL() override
Render passes encode render commands directed as one specific render target into an underlying comman...
static void Draw(SkCanvas *canvas, const SkRect &rect)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
PrimitiveType
Decides how backend draws pixels based on input vertices.
Ensures that bindings on the pass are not redundantly set or updated. Avoids making the driver do add...