Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
framebuffer_blend_contents.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_CONTENTS_FRAMEBUFFER_BLEND_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_FRAMEBUFFER_BLEND_CONTENTS_H_
7
8#include <memory>
9
12
13namespace impeller {
14
32
34 public:
36
38
39 void SetBlendMode(BlendMode blend_mode);
40
41 void SetChildContents(std::shared_ptr<Contents> child_contents);
42
43 private:
44 // |Contents|
45 std::optional<Rect> GetCoverage(const Entity& entity) const override;
46
47 // |Contents|
48 bool Render(const ContentContext& renderer,
49 const Entity& entity,
50 RenderPass& pass) const override;
51
52 BlendMode blend_mode_;
53 std::shared_ptr<Contents> child_contents_;
54
56
57 FramebufferBlendContents& operator=(const FramebufferBlendContents&) = delete;
58};
59
60} // namespace impeller
61
62#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FRAMEBUFFER_BLEND_CONTENTS_H_
void SetChildContents(std::shared_ptr< Contents > child_contents)
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:33
BlendMode
Definition color.h:59