Flutter Engine
 
Loading...
Searching...
No Matches
dl_vertices_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_DISPLAY_LIST_DL_VERTICES_GEOMETRY_H_
6#define FLUTTER_IMPELLER_DISPLAY_LIST_DL_VERTICES_GEOMETRY_H_
7
11
12namespace impeller {
13
14/// @brief A geometry that is created from a DlVertices object.
16 public:
17 DlVerticesGeometry(const std::shared_ptr<const flutter::DlVertices>& vertices,
18 const ContentContext& renderer);
19
21
23 Matrix effect_transform,
24 const ContentContext& renderer,
25 const Entity& entity,
26 RenderPass& pass) const override;
27
28 // |Geometry|
30 const Entity& entity,
31 RenderPass& pass) const override;
32
33 // |Geometry|
34 std::optional<Rect> GetCoverage(const Matrix& transform) const override;
35
36 bool HasVertexColors() const override;
37
38 bool HasTextureCoordinates() const override;
39
40 // |Geometry|
41 bool CanApplyMaskFilter() const override;
42
43 std::optional<Rect> GetTextureCoordinateCoverage() const override;
44
45 private:
46 PrimitiveType GetPrimitiveType() const;
47
48 /// @brief Check if index normalization is required, returning whether or
49 /// not it was performed.
50 ///
51 /// If true, [indices_] should be used in place of the vertices object's
52 /// indices.
53 bool MaybePerformIndexNormalization(const ContentContext& renderer);
54
55 const std::shared_ptr<const flutter::DlVertices> vertices_;
56 std::vector<uint16_t> indices_;
57 bool performed_normalization_ = false;
58 Rect bounds_;
59};
60
61} // namespace impeller
62
63#endif // FLUTTER_IMPELLER_DISPLAY_LIST_DL_VERTICES_GEOMETRY_H_
A geometry that is created from a DlVertices object.
bool HasTextureCoordinates() const override
std::optional< Rect > GetCoverage(const Matrix &transform) const override
bool CanApplyMaskFilter() const override
std::optional< Rect > GetTextureCoordinateCoverage() const override
GeometryResult GetPositionUVColorBuffer(Rect texture_coverage, Matrix effect_transform, const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool HasVertexColors() const override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:30
A geometry that is created from a vertices object.
PrimitiveType
Decides how backend draws pixels based on input vertices.
Definition formats.h:352
A 4x4 matrix using column-major storage.
Definition matrix.h:37