| Flutter Impeller |

inline_pass_context.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_ENTITY_INLINE_PASS_CONTEXT_H_
6 #define FLUTTER_IMPELLER_ENTITY_INLINE_PASS_CONTEXT_H_
7
8 #include <cstdint>
9
10 #include "impeller/entity/contents/content_context.h"
11 #include "impeller/entity/entity_pass_target.h"
12 #include "impeller/renderer/context.h"
13 #include "impeller/renderer/render_pass.h"
14
15 namespace impeller {
16
17 class InlinePassContext {
18 public:
19 InlinePassContext(const ContentContext& renderer,
20 EntityPassTarget& pass_target);
21
22 ~InlinePassContext();
23
24 bool IsValid() const;
25
26 bool IsActive() const;
27
28 std::shared_ptr<Texture> GetTexture();
29
30 bool EndPass(bool is_onscreen = false);
31
32 EntityPassTarget& GetPassTarget() const;
33
34 uint32_t GetPassCount() const;
35
36 const std::shared_ptr<RenderPass>& GetRenderPass();
37
38 private:
39 const ContentContext& renderer_;
40 EntityPassTarget& pass_target_;
41 std::shared_ptr<CommandBuffer> command_buffer_;
42 std::shared_ptr<RenderPass> pass_;
43 uint32_t pass_count_ = 0;
44
45 InlinePassContext(const InlinePassContext&) = delete;
46
47 InlinePassContext& operator=(const InlinePassContext&) = delete;
48 };
49
50 } // namespace impeller
51
52 #endif // FLUTTER_IMPELLER_ENTITY_INLINE_PASS_CONTEXT_H_
impeller::ContentContext
Definition: content_context.h:138
impeller::EntityPassTarget
Definition: entity_pass_target.h:15
impeller::InlinePassContext
Definition: inline_pass_context.h:17
impeller::InlinePassContext::EndPass
bool EndPass(bool is_onscreen=false)
Definition: inline_pass_context.cc:43
impeller::InlinePassContext::GetPassTarget
EntityPassTarget & GetPassTarget() const
Definition: inline_pass_context.cc:74
impeller::InlinePassContext::GetTexture
std::shared_ptr< Texture > GetTexture()
Definition: inline_pass_context.cc:36
impeller::InlinePassContext::~InlinePassContext
~InlinePassContext()
Definition: inline_pass_context.cc:24
impeller::InlinePassContext::InlinePassContext
InlinePassContext(const ContentContext &renderer, EntityPassTarget &pass_target)
Definition: inline_pass_context.cc:20
impeller::InlinePassContext::IsActive
bool IsActive() const
Definition: inline_pass_context.cc:32
impeller::InlinePassContext::IsValid
bool IsValid() const
Definition: inline_pass_context.cc:28
impeller::InlinePassContext::GetPassCount
uint32_t GetPassCount() const
Definition: inline_pass_context.cc:157
impeller::InlinePassContext::GetRenderPass
const std::shared_ptr< RenderPass > & GetRenderPass()
Definition: inline_pass_context.cc:78
content_context.h
entity_pass_target.h
impeller
Definition: allocation.cc:12
render_pass.h
context.h