| Flutter Impeller |

pass_bindings_cache.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PASS_BINDINGS_CACHE_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PASS_BINDINGS_CACHE_H_
7
8 #include <cstdint>
9 #include <optional>
10
11 #include "flutter/impeller/renderer/backend/vulkan/vk.h"
12
13 namespace impeller {
14
15 class PassBindingsCache {
16 public:
17 void BindPipeline(vk::CommandBuffer command_buffer,
18 vk::PipelineBindPoint pipeline_bind_point,
19 vk::Pipeline pipeline);
20
21 void SetStencilReference(vk::CommandBuffer command_buffer,
22 vk::StencilFaceFlags face_mask,
23 uint32_t reference);
24
25 void SetScissor(vk::CommandBuffer command_buffer,
26 uint32_t first_scissor,
27 uint32_t scissor_count,
28 const vk::Rect2D* scissors);
29
30 void SetViewport(vk::CommandBuffer command_buffer,
31 uint32_t first_viewport,
32 uint32_t viewport_count,
33 const vk::Viewport* viewports);
34
35 private:
36 // bindPipeline
37 std::optional<vk::Pipeline> graphics_pipeline_;
38 std::optional<vk::Pipeline> compute_pipeline_;
39 // setStencilReference
40 std::optional<vk::StencilFaceFlags> stencil_face_flags_;
41 uint32_t stencil_reference_ = 0;
42 // setScissor
43 std::optional<vk::Rect2D> scissors_;
44 // setViewport
45 std::optional<vk::Viewport> viewport_;
46 };
47
48 } // namespace impeller
49
50 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_PASS_BINDINGS_CACHE_H_
impeller::PassBindingsCache::SetStencilReference
void SetStencilReference(vk::CommandBuffer command_buffer, vk::StencilFaceFlags face_mask, uint32_t reference)
Definition: pass_bindings_cache.cc:32
vk.h
impeller::PassBindingsCache::SetScissor
void SetScissor(const IRect &scissor)
Definition: render_pass_mtl.mm:324
impeller::PassBindingsCache::SetViewport
void SetViewport(const Viewport &viewport)
Definition: render_pass_mtl.mm:309
impeller
Definition: aiks_context.cc:10
impeller::PassBindingsCache::BindPipeline
void BindPipeline(vk::CommandBuffer command_buffer, vk::PipelineBindPoint pipeline_bind_point, vk::Pipeline pipeline)
Definition: pass_bindings_cache.cc:8