Flutter Impeller
shadow_vertices_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_SHADOW_VERTICES_CONTENTS_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_SHADOW_VERTICES_CONTENTS_H_
7 
8 #include <memory>
9 
12 #include "impeller/entity/entity.h"
15 
16 namespace impeller {
17 
18 /// A vertices contents for (optional) per-color vertices + texture and any
19 /// blend mode.
21  public:
22  static std::shared_ptr<ShadowVerticesContents> Make(
23  const std::shared_ptr<ShadowVertices>& geometry);
24 
25  // |SolidBlurContents|
26  void SetColor(Color color) override;
27 
28  // |Contents|
29  std::optional<Rect> GetCoverage(const Entity& entity) const override;
30 
31  // |Contents|
32  bool Render(const ContentContext& renderer,
33  const Entity& entity,
34  RenderPass& pass) const override;
35 
36  explicit ShadowVerticesContents(
37  const std::shared_ptr<ShadowVertices>& geometry);
38 
39  ~ShadowVerticesContents() override;
40 
41  private:
42  const std::shared_ptr<ShadowVertices> geometry_;
43  Color shadow_color_;
44 
46 
47  ShadowVerticesContents& operator=(const ShadowVerticesContents&) = delete;
48 };
49 
50 } // namespace impeller
51 
52 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_SHADOW_VERTICES_CONTENTS_H_
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:30
ShadowVerticesContents(const std::shared_ptr< ShadowVertices > &geometry)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
static std::shared_ptr< ShadowVerticesContents > Make(const std::shared_ptr< ShadowVertices > &geometry)
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.
A base class for any accelerated single color blur Contents that lets the |Canvas::AttemptDrawBlur| c...