Flutter Impeller
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 
11 #include "impeller/entity/entity.h"
12 
13 namespace impeller {
14 
15 enum class BlendSelectValues {
16  kScreen = 0,
17  kOverlay,
18  kDarken,
19  kLighten,
21  kColorBurn,
22  kHardLight,
23  kSoftLight,
25  kExclusion,
26  kMultiply,
27  kHue,
29  kColor,
31 };
32 
34  public:
36 
37  ~FramebufferBlendContents() override;
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_
impeller::BlendSelectValues::kSaturation
@ kSaturation
impeller::FramebufferBlendContents
Definition: framebuffer_blend_contents.h:33
impeller::kColor
@ kColor
impeller::BlendSelectValues::kColorBurn
@ kColorBurn
impeller::BlendSelectValues::kMultiply
@ kMultiply
entity.h
impeller::BlendMode
BlendMode
Definition: color.h:59
impeller::BlendSelectValues::kSoftLight
@ kSoftLight
impeller::BlendSelectValues::kDifference
@ kDifference
impeller::FramebufferBlendContents::~FramebufferBlendContents
~FramebufferBlendContents() override
impeller::BlendSelectValues::kDarken
@ kDarken
impeller::BlendSelectValues::kExclusion
@ kExclusion
impeller::Entity
Definition: entity.h:21
color_source_contents.h
impeller::FramebufferBlendContents::FramebufferBlendContents
FramebufferBlendContents()
impeller::BlendSelectValues
BlendSelectValues
Definition: framebuffer_blend_contents.h:15
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
impeller::FramebufferBlendContents::SetChildContents
void SetChildContents(std::shared_ptr< Contents > child_contents)
Definition: framebuffer_blend_contents.cc:20
impeller::BlendSelectValues::kHardLight
@ kHardLight
impeller::BlendSelectValues::kScreen
@ kScreen
impeller::FramebufferBlendContents::SetBlendMode
void SetBlendMode(BlendMode blend_mode)
Definition: framebuffer_blend_contents.cc:16
impeller::BlendSelectValues::kLighten
@ kLighten
impeller::BlendSelectValues::kHue
@ kHue
impeller::BlendSelectValues::kLuminosity
@ kLuminosity
impeller::ColorSourceContents
Definition: color_source_contents.h:36
impeller
Definition: aiks_blur_unittests.cc:20
impeller::ContentContext
Definition: content_context.h:392
impeller::BlendSelectValues::kColorDodge
@ kColorDodge
impeller::BlendSelectValues::kOverlay
@ kOverlay