| Flutter Impeller |

cover_geometry.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_GEOMETRY_COVER_GEOMETRY_H_
6 #define FLUTTER_IMPELLER_ENTITY_GEOMETRY_COVER_GEOMETRY_H_
7
8 #include "impeller/entity/geometry/geometry.h"
9
10 namespace impeller {
11
12 /// @brief A geometry that implements "drawPaint" like behavior by covering
13 /// the entire render pass area.
14 class CoverGeometry final : public Geometry {
15 public:
16 CoverGeometry();
17
18 ~CoverGeometry() override = default;
19
20 // |Geometry|
21 bool CoversArea(const Matrix& transform, const Rect& rect) const override;
22
23 bool CanApplyMaskFilter() const override;
24
25 private:
26 // |Geometry|
27 GeometryResult GetPositionBuffer(const ContentContext& renderer,
28 const Entity& entity,
29 RenderPass& pass) const override;
30
31 // |Geometry|
32 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
33
34 CoverGeometry(const CoverGeometry&) = delete;
35
36 CoverGeometry& operator=(const CoverGeometry&) = delete;
37 };
38
39 } // namespace impeller
40
41 #endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_COVER_GEOMETRY_H_
impeller::ContentContext
Definition: content_context.h:138
impeller::CoverGeometry
A geometry that implements "drawPaint" like behavior by covering the entire render pass area.
Definition: cover_geometry.h:14
impeller::CoverGeometry::CanApplyMaskFilter
bool CanApplyMaskFilter() const override
Definition: cover_geometry.cc:45
impeller::CoverGeometry::CoversArea
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
Definition: cover_geometry.cc:40
impeller::CoverGeometry::CoverGeometry
CoverGeometry()
impeller::CoverGeometry::~CoverGeometry
~CoverGeometry() override=default
impeller::Entity
Definition: entity.h:26
impeller::Geometry
Definition: geometry.h:50
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:30
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:214
geometry.h
impeller
Definition: allocation.cc:12
impeller::GeometryResult
Definition: geometry.h:21
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::TRect< Scalar >