Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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"
10
11namespace impeller {
12
13class InlinePassContext;
14
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_
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