| Flutter Impeller |

entity_pass_target.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_ENTITY_PASS_TARGET_H_
6 #define FLUTTER_IMPELLER_ENTITY_ENTITY_PASS_TARGET_H_
7
8 #include "fml/macros.h"
9 #include "impeller/renderer/render_target.h"
10
11 namespace impeller {
12
13 class InlinePassContext;
14
15 class EntityPassTarget {
16 public:
17 explicit EntityPassTarget(const RenderTarget& render_target,
18 bool supports_read_from_resolve,
19 bool supports_implicit_msaa);
20
21 /// @brief Flips the backdrop and returns a readable texture that can be
22 /// bound/sampled to restore the previous pass.
23 ///
24 /// After this method is called, a new `RenderPass` that attaches the
25 /// result of `GetRenderTarget` is guaranteed to be able to read the
26 /// previous pass's backdrop texture (which is returned by this
27 /// method).
28 std::shared_ptr<Texture> Flip(Allocator& allocator);
29
30 const RenderTarget& GetRenderTarget() const;
31
32 bool IsValid() const;
33
34 private:
35 RenderTarget target_;
36 std::shared_ptr<Texture> secondary_color_texture_;
37
38 bool supports_read_from_resolve_;
39 bool supports_implicit_msaa_;
40
41 friend InlinePassContext;
42
43 EntityPassTarget& operator=(const EntityPassTarget&) = delete;
44 };
45
46 } // namespace impeller
47
48 #endif // FLUTTER_IMPELLER_ENTITY_ENTITY_PASS_TARGET_H_
impeller::EntityPassTarget::EntityPassTarget
EntityPassTarget(const RenderTarget &render_target, bool supports_read_from_resolve, bool supports_implicit_msaa)
Definition: entity_pass_target.cc:13
impeller::EntityPassTarget::IsValid
bool IsValid() const
Definition: entity_pass_target.cc:72
impeller::EntityPassTarget
Definition: entity_pass_target.h:15
impeller::InlinePassContext
Definition: inline_pass_context.h:17
impeller::Allocator
An object that allocates device memory.
Definition: allocator.h:22
impeller::RenderTarget
Definition: render_target.h:38
render_target.h
impeller
Definition: aiks_blur_unittests.cc:20
impeller::EntityPassTarget::GetRenderTarget
const RenderTarget & GetRenderTarget() const
Definition: entity_pass_target.cc:68
impeller::EntityPassTarget::Flip
std::shared_ptr< Texture > Flip(Allocator &allocator)
Flips the backdrop and returns a readable texture that can be bound/sampled to restore the previous p...
Definition: entity_pass_target.cc:20