| 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 #pragma once
6
7 #include <optional>
8
9 #include "flutter/impeller/renderer/backend/vulkan/vk.h"
10
11 namespace impeller {
12
13 class PassBindingsCache {
14 public:
15 void BindPipeline(vk::CommandBuffer command_buffer,
16 vk::PipelineBindPoint pipeline_bind_point,
17 vk::Pipeline pipeline);
18
19 void SetStencilReference(vk::CommandBuffer command_buffer,
20 vk::StencilFaceFlags face_mask,
21 uint32_t reference);
22
23 void SetScissor(vk::CommandBuffer command_buffer,
24 uint32_t first_scissor,
25 uint32_t scissor_count,
26 const vk::Rect2D* scissors);
27
28 void SetViewport(vk::CommandBuffer command_buffer,
29 uint32_t first_viewport,
30 uint32_t viewport_count,
31 const vk::Viewport* viewports);
32
33 private:
34 // bindPipeline
35 std::optional<vk::Pipeline> graphics_pipeline_;
36 std::optional<vk::Pipeline> compute_pipeline_;
37 // setStencilReference
38 std::optional<vk::StencilFaceFlags> stencil_face_flags_;
39 uint32_t stencil_reference_ = 0;
40 // setScissor
41 std::optional<vk::Rect2D> scissors_;
42 // setViewport
43 std::optional<vk::Viewport> viewport_;
44 };
45
46 } // namespace impeller
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:323
impeller::PassBindingsCache::SetViewport
void SetViewport(const Viewport &viewport)
Definition: render_pass_mtl.mm:308
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