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
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(const ContentContext& renderer);
29
31
32 /// @brief Remove the cached secondary color texture.
33 void RemoveSecondary();
34
35 bool IsValid() const;
36
37 private:
38 RenderTarget target_;
39 std::shared_ptr<Texture> secondary_color_texture_;
40
41 bool supports_read_from_resolve_;
42 bool supports_implicit_msaa_;
43
44 friend InlinePassContext;
45
46 EntityPassTarget& operator=(const EntityPassTarget&) = delete;
47};
48
49} // namespace impeller
50
51#endif // FLUTTER_IMPELLER_ENTITY_ENTITY_PASS_TARGET_H_
void RemoveSecondary()
Remove the cached secondary color texture.
std::shared_ptr< Texture > Flip(const ContentContext &renderer)
Flips the backdrop and returns a readable texture that can be bound/sampled to restore the previous p...