Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
complex_rse_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_COMPLEX_RSE_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_COMPLEX_RSE_CONTENTS_H_
7
8#include <memory>
9#include <optional>
10
18
19namespace impeller {
20
21/// A Contents class that renders asymmetric rounded superellipses using SDFs.
22///
23/// Separated from 'UberSDFContents' to reduce uniform bloat
25 public:
26 static std::unique_ptr<ComplexRoundedSuperellipseContents> Make(
27 Color color,
28 const Rect& bounds,
29 const RoundSuperellipseParam& round_superellipse_params,
30 std::optional<StrokeParameters> stroke);
31
32 bool Render(const ContentContext& renderer,
33 const Entity& entity,
34 RenderPass& pass) const override;
35
36 std::optional<Rect> GetCoverage(const Entity& entity) const override;
37
38 const Geometry* GetGeometry() const override;
39
40 private:
42 Color color,
43 const Rect& bounds,
44 const RoundSuperellipseParam& round_superellipse_params,
45 std::optional<StrokeParameters> stroke);
46
47 Color color_;
48 Rect bounds_;
49 RoundSuperellipseParam round_superellipse_params_;
50 std::optional<StrokeParameters> stroke_;
51 std::unique_ptr<Geometry> geometry_;
52
55
58};
59
60} // namespace impeller
61
62#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_COMPLEX_RSE_CONTENTS_H_
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
static std::unique_ptr< ComplexRoundedSuperellipseContents > Make(Color color, const Rect &bounds, const RoundSuperellipseParam &round_superellipse_params, std::optional< StrokeParameters > stroke)
const Geometry * GetGeometry() const override
Get the geometry that this contents will use to render.
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.
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:30