| Flutter Impeller |

canvas.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_CANVAS_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_CANVAS_H_
7
8 #include <deque>
9 #include <functional>
10 #include <memory>
11 #include <optional>
12 #include <utility>
13 #include <vector>
14
15 #include "flutter/display_list/effects/dl_image_filter.h"
16 #include "flutter/display_list/geometry/dl_path.h"
17 #include "impeller/core/sampler_descriptor.h"
18 #include "impeller/display_list/paint.h"
19 #include "impeller/entity/contents/atlas_contents.h"
20 #include "impeller/entity/contents/clip_contents.h"
21 #include "impeller/entity/contents/solid_rrect_like_blur_contents.h"
22 #include "impeller/entity/contents/text_contents.h"
23 #include "impeller/entity/entity.h"
24 #include "impeller/entity/entity_pass_clip_stack.h"
25 #include "impeller/entity/geometry/geometry.h"
26 #include "impeller/entity/geometry/round_rect_geometry.h"
27 #include "impeller/entity/geometry/round_superellipse_geometry.h"
28 #include "impeller/entity/geometry/vertices_geometry.h"
29 #include "impeller/entity/inline_pass_context.h"
30 #include "impeller/geometry/arc.h"
31 #include "impeller/geometry/matrix.h"
32 #include "impeller/geometry/point.h"
33 #include "impeller/geometry/round_rect.h"
34 #include "impeller/geometry/vector.h"
35 #include "impeller/renderer/snapshot.h"
36 #include "impeller/typographer/text_frame.h"
37
38 namespace impeller {
39
40 struct BackdropData {
41 size_t backdrop_count = 0;
42 bool all_filters_equal = true;
43 std::shared_ptr<Texture> texture_slot;
44 // A single snapshot of the backdrop filter that is used when there are
45 // multiple backdrops that share an identical filter.
46 std::optional<Snapshot> shared_filter_snapshot;
47 std::shared_ptr<flutter::DlImageFilter> last_backdrop;
48 };
49
50 struct CanvasStackEntry {
51 Matrix transform;
52 uint32_t clip_depth = 0u;
53 size_t clip_height = 0u;
54 // The number of clips tracked for this canvas stack entry.
55 size_t num_clips = 0u;
56 Scalar distributed_opacity = 1.0f;
57 Entity::RenderingMode rendering_mode = Entity::RenderingMode::kDirect;
58 // Whether all entities in the current save should be skipped.
59 bool skipping = false;
60 // Whether subpass coverage was rounded out to pixel coverage, or if false
61 // truncated.
62 bool did_round_out = false;
63 };
64
65 enum class PointStyle {
66 /// @brief Points are drawn as squares.
67 kRound,
68
69 /// @brief Points are drawn as circles.
70 kSquare,
71 };
72
73 /// Controls the behavior of the source rectangle given to DrawImageRect.
74 enum class SourceRectConstraint {
75 /// @brief Faster, but may sample outside the bounds of the source rectangle.
76 kFast,
77
78 /// @brief Sample only within the source rectangle. May be slower.
79 kStrict,
80 };
81
82 /// Specifies how much to trust the bounds rectangle provided for a list
83 /// of contents. Used by both |EntityPass| and |Canvas::SaveLayer|.
84 enum class ContentBoundsPromise {
85 /// @brief The caller makes no claims related to the size of the bounds.
86 kUnknown,
87
88 /// @brief The caller claims the bounds are a reasonably tight estimate
89 /// of the coverage of the contents and should contain all of the
90 /// contents.
91 kContainsContents,
92
93 /// @brief The caller claims the bounds are a subset of an estimate of
94 /// the reasonably tight bounds but likely clips off some of the
95 /// contents.
96 kMayClipContents,
97 };
98
99 class LazyRenderingConfig {
100 public:
101 LazyRenderingConfig(ContentContext& renderer,
102 std::unique_ptr<EntityPassTarget> p_entity_pass_target);
103
104 LazyRenderingConfig(LazyRenderingConfig&&) = default;
105
106 /// Whether or not the clear color texture can still be updated.
107 bool IsApplyingClearColor() const;
108
109 EntityPassTarget* GetEntityPassTarget() const;
110
111 InlinePassContext* GetInlinePassContext() const;
112
113 private:
114 std::unique_ptr<EntityPassTarget> entity_pass_target_;
115 std::unique_ptr<InlinePassContext> inline_pass_context_;
116 };
117
118 class Canvas {
119 public:
120 static constexpr uint32_t kMaxDepth = 1 << 24;
121
122 using BackdropFilterProc = std::function<std::shared_ptr<FilterContents>(
123 FilterInput::Ref,
124 const Matrix& effect_transform,
125 Entity::RenderingMode rendering_mode)>;
126
127 Canvas(ContentContext& renderer,
128 const RenderTarget& render_target,
129 bool is_onscreen,
130 bool requires_readback);
131
132 explicit Canvas(ContentContext& renderer,
133 const RenderTarget& render_target,
134 bool is_onscreen,
135 bool requires_readback,
136 Rect cull_rect);
137
138 explicit Canvas(ContentContext& renderer,
139 const RenderTarget& render_target,
140 bool is_onscreen,
141 bool requires_readback,
142 IRect32 cull_rect);
143
144 ~Canvas() = default;
145
146 /// @brief Update the backdrop data used to group together backdrop filters
147 /// within the same layer
148 void SetBackdropData(std::unordered_map<int64_t, BackdropData> backdrop_data,
149 size_t backdrop_count);
150
151 /// @brief Return the culling bounds of the current render target, or nullopt
152 /// if there is no coverage.
153 std::optional<Rect> GetLocalCoverageLimit() const;
154
155 void Save(uint32_t total_content_depth = kMaxDepth);
156
157 void SaveLayer(
158 const Paint& paint,
159 std::optional<Rect> bounds = std::nullopt,
160 const flutter::DlImageFilter* backdrop_filter = nullptr,
161 ContentBoundsPromise bounds_promise = ContentBoundsPromise::kUnknown,
162 uint32_t total_content_depth = kMaxDepth,
163 bool can_distribute_opacity = false,
164 std::optional<int64_t> backdrop_id = std::nullopt);
165
166 bool Restore();
167
168 size_t GetSaveCount() const;
169
170 void RestoreToCount(size_t count);
171
172 const Matrix& GetCurrentTransform() const;
173
174 void ResetTransform();
175
176 void Transform(const Matrix& transform);
177
178 void Concat(const Matrix& transform);
179
180 void PreConcat(const Matrix& transform);
181
182 void Translate(const Vector3& offset);
183
184 void Scale(const Vector2& scale);
185
186 void Scale(const Vector3& scale);
187
188 void Skew(Scalar sx, Scalar sy);
189
190 void Rotate(Radians radians);
191
192 void DrawPath(const flutter::DlPath& path, const Paint& paint);
193
194 void DrawPaint(const Paint& paint);
195
196 void DrawLine(const Point& p0,
197 const Point& p1,
198 const Paint& paint,
199 bool reuse_depth = false);
200
201 void DrawDashedLine(const Point& p0,
202 const Point& p1,
203 Scalar on_length,
204 Scalar off_length,
205 const Paint& paint);
206
207 void DrawRect(const Rect& rect, const Paint& paint);
208
209 void DrawOval(const Rect& rect, const Paint& paint);
210
211 void DrawArc(const Arc& arc, const Paint& paint);
212
213 void DrawRoundRect(const RoundRect& rect, const Paint& paint);
214
215 void DrawDiffRoundRect(const RoundRect& outer,
216 const RoundRect& inner,
217 const Paint& paint);
218
219 void DrawRoundSuperellipse(const RoundSuperellipse& rse, const Paint& paint);
220
221 void DrawCircle(const Point& center, Scalar radius, const Paint& paint);
222
223 void DrawPoints(const Point points[],
224 uint32_t count,
225 Scalar radius,
226 const Paint& paint,
227 PointStyle point_style);
228
229 void DrawImage(const std::shared_ptr<Texture>& image,
230 Point offset,
231 const Paint& paint,
232 const SamplerDescriptor& sampler = {});
233
234 void DrawImageRect(
235 const std::shared_ptr<Texture>& image,
236 Rect source,
237 Rect dest,
238 const Paint& paint,
239 const SamplerDescriptor& sampler = {},
240 SourceRectConstraint src_rect_constraint = SourceRectConstraint::kFast);
241
242 void DrawTextFrame(const std::shared_ptr<TextFrame>& text_frame,
243 Point position,
244 const Paint& paint);
245
246 void DrawVertices(const std::shared_ptr<VerticesGeometry>& vertices,
247 BlendMode blend_mode,
248 const Paint& paint);
249
250 void DrawAtlas(const std::shared_ptr<AtlasContents>& atlas_contents,
251 const Paint& paint);
252
253 void ClipGeometry(const Geometry& geometry,
254 Entity::ClipOperation clip_op,
255 bool is_aa = true);
256
257 void EndReplay();
258
259 uint64_t GetOpDepth() const { return current_depth_; }
260
261 uint64_t GetMaxOpDepth() const { return transform_stack_.back().clip_depth; }
262
263 struct SaveLayerState {
264 Paint paint;
265 Rect coverage;
266 };
267
268 // Visible for testing.
269 bool RequiresReadback() const { return requires_readback_; }
270
271 // Whether the current device has the capabilities to blit an offscreen
272 // texture into the onscreen.
273 //
274 // This requires the availibility of the blit framebuffer command, but is
275 // disabled for GLES. A simple glBlitFramebuffer does not support resolving
276 // different sample counts which may be present in GLES when using MSAA.
277 //
278 // Visible for testing.
279 bool SupportsBlitToOnscreen() const;
280
281 /// For picture snapshots we need addition steps to verify that final mipmaps
282 /// are generated.
283 bool EnsureFinalMipmapGeneration() const;
284
285 private:
286 class RRectLikeBlurShape {
287 public:
288 virtual ~RRectLikeBlurShape() = default;
289 virtual std::shared_ptr<SolidRRectLikeBlurContents> BuildBlurContent() = 0;
290 virtual Geometry& BuildGeometry(Rect rect, Scalar radius) = 0;
291 };
292
293 class RRectBlurShape : public RRectLikeBlurShape {
294 public:
295 std::shared_ptr<SolidRRectLikeBlurContents> BuildBlurContent() override;
296 Geometry& BuildGeometry(Rect rect, Scalar radius) override;
297
298 private:
299 std::optional<RoundRectGeometry> geom_; // optional stack allocation
300 };
301
302 class RSuperellipseBlurShape : public RRectLikeBlurShape {
303 public:
304 std::shared_ptr<SolidRRectLikeBlurContents> BuildBlurContent() override;
305 Geometry& BuildGeometry(Rect rect, Scalar radius) override;
306
307 private:
308 std::optional<RoundSuperellipseGeometry>
309 geom_; // optional stack allocation
310 };
311
312 ContentContext& renderer_;
313 RenderTarget render_target_;
314 const bool is_onscreen_;
315 bool requires_readback_;
316 EntityPassClipStack clip_coverage_stack_;
317
318 std::deque<CanvasStackEntry> transform_stack_;
319 std::optional<Rect> initial_cull_rect_;
320 std::vector<LazyRenderingConfig> render_passes_;
321 std::vector<SaveLayerState> save_layer_state_;
322
323 /// Backdrop layers identified by an optional backdrop id.
324 ///
325 /// This is not the same as the [backdrop_count_] below as not
326 /// all backdrop filters will have an identified backdrop id. The
327 /// backdrop_count_ is also mutated during rendering.
328 std::unordered_map<int64_t, BackdropData> backdrop_data_;
329
330 /// The remaining number of backdrop filters.
331 ///
332 /// This value is decremented while rendering. When it reaches 0, then
333 /// the FlipBackdrop can use the onscreen render target instead of
334 /// another offscreen.
335 ///
336 /// This optimization is disabled on devices that do not support framebuffer
337 /// fetch (iOS Simulator and certain OpenGLES devices).
338 size_t backdrop_count_ = 0u;
339
340 // All geometry objects created for regular draws can be stack allocated,
341 // but clip geometries must be cached for record/replay for backdrop filters
342 // and so must be kept alive longer.
343 std::vector<std::unique_ptr<Geometry>> clip_geometry_;
344
345 uint64_t current_depth_ = 0u;
346
347 Point GetGlobalPassPosition() const;
348
349 // clip depth of the previous save or 0.
350 size_t GetClipHeightFloor() const;
351
352 /// @brief Whether all entites should be skipped until a corresponding
353 /// restore.
354 bool IsSkipping() const;
355
356 /// @brief Skip all rendering/clipping entities until next restore.
357 void SkipUntilMatchingRestore(size_t total_content_depth);
358
359 void SetupRenderPass();
360
361 /// @brief Ends the current render pass, saving the result as a texture, and
362 /// thenrestart it with the backdrop cleared to the previous contents.
363 ///
364 /// The returned texture is used as the input for backdrop filters and
365 /// emulated advanced blends. Returns nullptr if there was a validation
366 /// failure.
367 ///
368 /// [should_remove_texture] defaults to false. If true, the render target
369 /// texture is removed from the entity pass target. This allows the texture to
370 /// be cached by the canvas dispatcher for usage in the backdrop filter reuse
371 /// mechanism.
372 ///
373 /// [should_use_onscreen] defaults to false. If true, the results are flipped
374 /// to the onscreen render target. This will set requires_readback_ to false.
375 /// This action is only safe to perform when there are no more backdrop
376 /// filters or advanced blends, or no more backdrop filters and the device
377 /// supports framebuffer fetch.
378 std::shared_ptr<Texture> FlipBackdrop(Point global_pass_position,
379 bool should_remove_texture = false,
380 bool should_use_onscreen = false,
381 bool post_depth_increment = false);
382
383 bool BlitToOnscreen(bool is_onscreen = false);
384
385 size_t GetClipHeight() const;
386
387 void Initialize(std::optional<Rect> cull_rect);
388
389 void Reset();
390
391 void AddRenderEntityWithFiltersToCurrentPass(Entity& entity,
392 const Geometry* geometry,
393 const Paint& paint,
394 bool reuse_depth = false);
395
396 void AddRenderEntityToCurrentPass(Entity& entity, bool reuse_depth = false);
397
398 bool AttemptDrawBlurredRRect(const Rect& rect,
399 Size corner_radii,
400 const Paint& paint);
401
402 bool AttemptDrawBlurredRSuperellipse(const Rect& rect,
403 Size corner_radii,
404 const Paint& paint);
405
406 bool AttemptDrawBlurredRRectLike(const Rect& rect,
407 Size corner_radii,
408 const Paint& paint,
409 RRectLikeBlurShape& shape);
410
411 /// For simple DrawImageRect calls, optimize any draws with a color filter
412 /// into the corresponding atlas draw.
413 ///
414 /// Returns whether not the optimization was applied.
415 bool AttemptColorFilterOptimization(const std::shared_ptr<Texture>& image,
416 Rect source,
417 Rect dest,
418 const Paint& paint,
419 const SamplerDescriptor& sampler,
420 SourceRectConstraint src_rect_constraint);
421
422 bool AttemptBlurredTextOptimization(
423 const std::shared_ptr<TextFrame>& text_frame,
424 const std::shared_ptr<TextContents>& text_contents,
425 Entity& entity,
426 const Paint& paint);
427
428 RenderPass& GetCurrentRenderPass() const;
429
430 Canvas(const Canvas&) = delete;
431
432 Canvas& operator=(const Canvas&) = delete;
433 };
434
435 } // namespace impeller
436
437 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_CANVAS_H_
arc.h
atlas_contents.h
impeller::Canvas
Definition: canvas.h:118
impeller::Canvas::ClipGeometry
void ClipGeometry(const Geometry &geometry, Entity::ClipOperation clip_op, bool is_aa=true)
Definition: canvas.cc:827
impeller::Canvas::kMaxDepth
static constexpr uint32_t kMaxDepth
Definition: canvas.h:120
impeller::Canvas::SetBackdropData
void SetBackdropData(std::unordered_map< int64_t, BackdropData > backdrop_data, size_t backdrop_count)
Update the backdrop data used to group together backdrop filters within the same layer.
Definition: canvas.cc:1892
impeller::Canvas::Canvas
Canvas(ContentContext &renderer, const RenderTarget &render_target, bool is_onscreen, bool requires_readback)
Definition: canvas.cc:198
impeller::Canvas::RequiresReadback
bool RequiresReadback() const
Definition: canvas.h:269
impeller::Canvas::DrawRoundSuperellipse
void DrawRoundSuperellipse(const RoundSuperellipse &rse, const Paint &paint)
Definition: canvas.cc:782
impeller::Canvas::GetLocalCoverageLimit
std::optional< Rect > GetLocalCoverageLimit() const
Return the culling bounds of the current render target, or nullopt if there is no coverage.
Definition: canvas.cc:1203
impeller::Canvas::SaveLayer
void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const flutter::DlImageFilter *backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown, uint32_t total_content_depth=kMaxDepth, bool can_distribute_opacity=false, std::optional< int64_t > backdrop_id=std::nullopt)
Definition: canvas.cc:1240
impeller::Canvas::GetCurrentTransform
const Matrix & GetCurrentTransform() const
Definition: canvas.cc:272
impeller::Canvas::DrawVertices
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
Definition: canvas.cc:1006
impeller::Canvas::DrawOval
void DrawOval(const Rect &rect, const Paint &paint)
Definition: canvas.cc:650
impeller::Canvas::DrawImageRect
void DrawImageRect(const std::shared_ptr< Texture > &image, Rect source, Rect dest, const Paint &paint, const SamplerDescriptor &sampler={}, SourceRectConstraint src_rect_constraint=SourceRectConstraint::kFast)
Definition: canvas.cc:941
impeller::Canvas::RestoreToCount
void RestoreToCount(size_t count)
Definition: canvas.cc:319
impeller::Canvas::Restore
bool Restore()
Definition: canvas.cc:1478
impeller::Canvas::GetSaveCount
size_t GetSaveCount() const
Definition: canvas.cc:311
impeller::Canvas::Concat
void Concat(const Matrix &transform)
Definition: canvas.cc:256
impeller::Canvas::Transform
void Transform(const Matrix &transform)
Definition: canvas.cc:268
impeller::Canvas::GetMaxOpDepth
uint64_t GetMaxOpDepth() const
Definition: canvas.h:261
impeller::Canvas::DrawDashedLine
void DrawDashedLine(const Point &p0, const Point &p1, Scalar on_length, Scalar off_length, const Paint &paint)
Definition: canvas.cc:606
impeller::Canvas::DrawDiffRoundRect
void DrawDiffRoundRect(const RoundRect &outer, const RoundRect &inner, const Paint &paint)
Definition: canvas.cc:766
impeller::Canvas::DrawPath
void DrawPath(const flutter::DlPath &path, const Paint &paint)
Definition: canvas.cc:327
impeller::Canvas::BackdropFilterProc
std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, const Matrix &effect_transform, Entity::RenderingMode rendering_mode)> BackdropFilterProc
Definition: canvas.h:125
impeller::Canvas::PreConcat
void PreConcat(const Matrix &transform)
Definition: canvas.cc:260
impeller::Canvas::Rotate
void Rotate(Radians radians)
Definition: canvas.cc:292
impeller::Canvas::DrawPoints
void DrawPoints(const Point points[], uint32_t count, Scalar radius, const Paint &paint, PointStyle point_style)
Definition: canvas.cc:909
impeller::Canvas::ResetTransform
void ResetTransform()
Definition: canvas.cc:264
impeller::Canvas::DrawTextFrame
void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
Definition: canvas.cc:1669
impeller::Canvas::DrawImage
void DrawImage(const std::shared_ptr< Texture > &image, Point offset, const Paint &paint, const SamplerDescriptor &sampler={})
Definition: canvas.cc:927
impeller::Canvas::DrawPaint
void DrawPaint(const Paint &paint)
Definition: canvas.cc:341
impeller::Canvas::EndReplay
void EndReplay()
Definition: canvas.cc:2091
impeller::Canvas::DrawRoundRect
void DrawRoundRect(const RoundRect &rect, const Paint &paint)
Definition: canvas.cc:734
impeller::Canvas::Skew
void Skew(Scalar sx, Scalar sy)
Definition: canvas.cc:288
impeller::Canvas::~Canvas
~Canvas()=default
impeller::Canvas::Scale
void Scale(const Vector2 &scale)
Definition: canvas.cc:280
impeller::Canvas::GetOpDepth
uint64_t GetOpDepth() const
Definition: canvas.h:259
impeller::Canvas::Save
void Save(uint32_t total_content_depth=kMaxDepth)
Definition: canvas.cc:1186
impeller::Canvas::SupportsBlitToOnscreen
bool SupportsBlitToOnscreen() const
Definition: canvas.cc:2015
impeller::Canvas::DrawRect
void DrawRect(const Rect &rect, const Paint &paint)
Definition: canvas.cc:632
impeller::Canvas::EnsureFinalMipmapGeneration
bool EnsureFinalMipmapGeneration() const
Definition: canvas.cc:2073
impeller::Canvas::DrawAtlas
void DrawAtlas(const std::shared_ptr< AtlasContents > &atlas_contents, const Paint &paint)
Definition: canvas.cc:1120
impeller::Canvas::DrawLine
void DrawLine(const Point &p0, const Point &p1, const Paint &paint, bool reuse_depth=false)
Definition: canvas.cc:584
impeller::Canvas::Translate
void Translate(const Vector3 &offset)
Definition: canvas.cc:276
impeller::Canvas::DrawCircle
void DrawCircle(const Point &center, Scalar radius, const Paint &paint)
Definition: canvas.cc:804
impeller::Canvas::DrawArc
void DrawArc(const Arc &arc, const Paint &paint)
Definition: canvas.cc:679
impeller::ContentContext
Definition: content_context.h:138
impeller::Entity::RenderingMode
RenderingMode
Definition: entity.h:33
impeller::Entity::RenderingMode::kDirect
@ kDirect
impeller::Entity::ClipOperation
ClipOperation
Definition: entity.h:67
impeller::EntityPassTarget
Definition: entity_pass_target.h:15
impeller::FilterInput::Ref
std::shared_ptr< FilterInput > Ref
Definition: filter_input.h:32
impeller::Geometry
Definition: geometry.h:50
impeller::InlinePassContext
Definition: inline_pass_context.h:17
impeller::LazyRenderingConfig
Definition: canvas.h:99
impeller::LazyRenderingConfig::LazyRenderingConfig
LazyRenderingConfig(ContentContext &renderer, std::unique_ptr< EntityPassTarget > p_entity_pass_target)
Definition: canvas.cc:2119
impeller::LazyRenderingConfig::IsApplyingClearColor
bool IsApplyingClearColor() const
Whether or not the clear color texture can still be updated.
Definition: canvas.cc:2127
impeller::LazyRenderingConfig::GetEntityPassTarget
EntityPassTarget * GetEntityPassTarget() const
Definition: canvas.cc:2131
impeller::LazyRenderingConfig::LazyRenderingConfig
LazyRenderingConfig(LazyRenderingConfig &&)=default
impeller::LazyRenderingConfig::GetInlinePassContext
InlinePassContext * GetInlinePassContext() const
Definition: canvas.cc:2135
impeller::RenderTarget
Definition: render_target.h:38
clip_contents.h
paint.h
entity.h
entity_pass_clip_stack.h
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:214
geometry.h
inline_pass_context.h
matrix.h
impeller
Definition: allocation.cc:12
impeller::Scalar
float Scalar
Definition: scalar.h:19
impeller::SourceRectConstraint
SourceRectConstraint
Controls the behavior of the source rectangle given to DrawImageRect.
Definition: canvas.h:74
impeller::SourceRectConstraint::kStrict
@ kStrict
Sample only within the source rectangle. May be slower.
impeller::SourceRectConstraint::kFast
@ kFast
Faster, but may sample outside the bounds of the source rectangle.
impeller::Rect
TRect< Scalar > Rect
Definition: rect.h:788
impeller::PointStyle
PointStyle
Definition: canvas.h:65
impeller::PointStyle::kRound
@ kRound
Points are drawn as squares.
impeller::PointStyle::kSquare
@ kSquare
Points are drawn as circles.
impeller::Point
TPoint< Scalar > Point
Definition: point.h:327
impeller::DlPath
flutter::DlPath DlPath
Definition: dl_dispatcher.h:29
impeller::BlendMode
BlendMode
Definition: color.h:58
impeller::ContentBoundsPromise
ContentBoundsPromise
Definition: canvas.h:84
impeller::ContentBoundsPromise::kUnknown
@ kUnknown
The caller makes no claims related to the size of the bounds.
impeller::ContentBoundsPromise::kMayClipContents
@ kMayClipContents
The caller claims the bounds are a subset of an estimate of the reasonably tight bounds but likely cl...
impeller::ContentBoundsPromise::kContainsContents
@ kContainsContents
The caller claims the bounds are a reasonably tight estimate of the coverage of the contents and shou...
impeller::Size
TSize< Scalar > Size
Definition: size.h:159
point.h
round_rect.h
round_rect_geometry.h
round_superellipse_geometry.h
sampler_descriptor.h
snapshot.h
solid_rrect_like_blur_contents.h
impeller::Arc
Definition: arc.h:13
impeller::BackdropData
Definition: canvas.h:40
impeller::BackdropData::all_filters_equal
bool all_filters_equal
Definition: canvas.h:42
impeller::BackdropData::texture_slot
std::shared_ptr< Texture > texture_slot
Definition: canvas.h:43
impeller::BackdropData::last_backdrop
std::shared_ptr< flutter::DlImageFilter > last_backdrop
Definition: canvas.h:47
impeller::BackdropData::backdrop_count
size_t backdrop_count
Definition: canvas.h:41
impeller::BackdropData::shared_filter_snapshot
std::optional< Snapshot > shared_filter_snapshot
Definition: canvas.h:46
impeller::Canvas::SaveLayerState
Definition: canvas.h:263
impeller::Canvas::SaveLayerState::coverage
Rect coverage
Definition: canvas.h:265
impeller::Canvas::SaveLayerState::paint
Paint paint
Definition: canvas.h:264
impeller::CanvasStackEntry
Definition: canvas.h:50
impeller::CanvasStackEntry::clip_height
size_t clip_height
Definition: canvas.h:53
impeller::CanvasStackEntry::did_round_out
bool did_round_out
Definition: canvas.h:62
impeller::CanvasStackEntry::rendering_mode
Entity::RenderingMode rendering_mode
Definition: canvas.h:57
impeller::CanvasStackEntry::distributed_opacity
Scalar distributed_opacity
Definition: canvas.h:56
impeller::CanvasStackEntry::skipping
bool skipping
Definition: canvas.h:59
impeller::CanvasStackEntry::num_clips
size_t num_clips
Definition: canvas.h:55
impeller::CanvasStackEntry::transform
Matrix transform
Definition: canvas.h:51
impeller::CanvasStackEntry::clip_depth
uint32_t clip_depth
Definition: canvas.h:52
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::Paint
Definition: paint.h:27
impeller::Radians
Definition: scalar.h:44
impeller::RoundRect
Definition: round_rect.h:16
impeller::RoundSuperellipse
Definition: round_superellipse.h:18
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:14
impeller::TPoint< Scalar >
impeller::TRect< Scalar >
impeller::Vector3
Definition: vector.h:20
points
std::vector< Point > points
Definition: tessellator_libtess.cc:76
text_contents.h
text_frame.h
vector.h
vertices_geometry.h