Flutter Engine
The Flutter Engine
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
9
10namespace impeller {
11
12/// @brief A geometry that implements "drawPaint" like behavior by covering
13/// the entire render pass area.
14class CoverGeometry final : public Geometry {
15 public:
17
18 ~CoverGeometry() = 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
40
41} // namespace impeller
42
43#endif // FLUTTER_IMPELLER_ENTITY_GEOMETRY_COVER_GEOMETRY_H_
A geometry that implements "drawPaint" like behavior by covering the entire render pass area.
bool CanApplyMaskFilter() const override
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...
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
uint8_t value
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition: p3.cpp:47
A 4x4 matrix using column-major storage.
Definition: matrix.h:37