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