Flutter Engine
The Flutter Engine
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
9
10namespace impeller {
11
12class InlinePassContext;
13
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_
An object that allocates device memory.
Definition: allocator.h:22
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...
const RenderTarget & GetRenderTarget() const
EntityPassTarget(const RenderTarget &render_target, bool supports_read_from_resolve, bool supports_implicit_msaa)