| 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 BlurShape {
287 public:
288 virtual ~BlurShape() = default;
289 virtual Rect GetBounds() const = 0;
290 virtual std::shared_ptr<SolidBlurContents> BuildBlurContent(
291 Sigma sigma) = 0;
292 virtual const Geometry& BuildDrawGeometry() = 0;
293 };
294 class RRectBlurShape;
295 class RSuperellipseBlurShape;
296 class PathBlurShape;
297
298 ContentContext& renderer_;
299 RenderTarget render_target_;
300 const bool is_onscreen_;
301 bool requires_readback_;
302 EntityPassClipStack clip_coverage_stack_;
303
304 std::deque<CanvasStackEntry> transform_stack_;
305 std::optional<Rect> initial_cull_rect_;
306 std::vector<LazyRenderingConfig> render_passes_;
307 std::vector<SaveLayerState> save_layer_state_;
308
309 /// Backdrop layers identified by an optional backdrop id.
310 ///
311 /// This is not the same as the [backdrop_count_] below as not
312 /// all backdrop filters will have an identified backdrop id. The
313 /// backdrop_count_ is also mutated during rendering.
314 std::unordered_map<int64_t, BackdropData> backdrop_data_;
315
316 /// The remaining number of backdrop filters.
317 ///
318 /// This value is decremented while rendering. When it reaches 0, then
319 /// the FlipBackdrop can use the onscreen render target instead of
320 /// another offscreen.
321 ///
322 /// This optimization is disabled on devices that do not support framebuffer
323 /// fetch (iOS Simulator and certain OpenGLES devices).
324 size_t backdrop_count_ = 0u;
325
326 // All geometry objects created for regular draws can be stack allocated,
327 // but clip geometries must be cached for record/replay for backdrop filters
328 // and so must be kept alive longer.
329 std::vector<std::unique_ptr<Geometry>> clip_geometry_;
330
331 uint64_t current_depth_ = 0u;
332
333 Point GetGlobalPassPosition() const;
334
335 // clip depth of the previous save or 0.
336 size_t GetClipHeightFloor() const;
337
338 /// @brief Whether all entites should be skipped until a corresponding
339 /// restore.
340 bool IsSkipping() const;
341
342 /// @brief Skip all rendering/clipping entities until next restore.
343 void SkipUntilMatchingRestore(size_t total_content_depth);
344
345 void SetupRenderPass();
346
347 /// @brief Ends the current render pass, saving the result as a texture, and
348 /// thenrestart it with the backdrop cleared to the previous contents.
349 ///
350 /// The returned texture is used as the input for backdrop filters and
351 /// emulated advanced blends. Returns nullptr if there was a validation
352 /// failure.
353 ///
354 /// [should_remove_texture] defaults to false. If true, the render target
355 /// texture is removed from the entity pass target. This allows the texture to
356 /// be cached by the canvas dispatcher for usage in the backdrop filter reuse
357 /// mechanism.
358 ///
359 /// [should_use_onscreen] defaults to false. If true, the results are flipped
360 /// to the onscreen render target. This will set requires_readback_ to false.
361 /// This action is only safe to perform when there are no more backdrop
362 /// filters or advanced blends, or no more backdrop filters and the device
363 /// supports framebuffer fetch.
364 std::shared_ptr<Texture> FlipBackdrop(Point global_pass_position,
365 bool should_remove_texture = false,
366 bool should_use_onscreen = false,
367 bool post_depth_increment = false);
368
369 bool BlitToOnscreen(bool is_onscreen = false);
370
371 size_t GetClipHeight() const;
372
373 void Initialize(std::optional<Rect> cull_rect);
374
375 void Reset();
376
377 void AddRenderEntityWithFiltersToCurrentPass(Entity& entity,
378 const Geometry* geometry,
379 const Paint& paint,
380 bool reuse_depth = false);
381
382 void AddRenderEntityToCurrentPass(Entity& entity, bool reuse_depth = false);
383
384 /// Returns true if this operation is consistent with a DrawShadow-like
385 /// operation.
386 static bool IsShadowBlurDrawOperation(const Paint& paint);
387
388 bool AttemptDrawAntialiasedCircle(const Point& center,
389 Scalar radius,
390 const Paint& paint);
391
392 /// Returns the radius common to both width and height of all corners,
393 /// or -1 if the radii are not uniform.
394 static Scalar GetCommonRRectLikeRadius(const RoundingRadii& radii);
395
396 bool AttemptDrawBlurredPathSource(const PathSource& source,
397 const Paint& paint);
398
399 bool AttemptDrawBlurredRRect(const RoundRect& round_rect, const Paint& paint);
400
401 bool AttemptDrawBlurredRSuperellipse(const RoundSuperellipse& rse,
402 const Paint& paint);
403
404 bool AttemptDrawBlur(BlurShape& shape, const Paint& paint);
405
406 /// For simple DrawImageRect calls, optimize any draws with a color filter
407 /// into the corresponding atlas draw.
408 ///
409 /// Returns whether not the optimization was applied.
410 bool AttemptColorFilterOptimization(const std::shared_ptr<Texture>& image,
411 Rect source,
412 Rect dest,
413 const Paint& paint,
414 const SamplerDescriptor& sampler,
415 SourceRectConstraint src_rect_constraint);
416
417 bool AttemptBlurredTextOptimization(
418 const std::shared_ptr<TextFrame>& text_frame,
419 const std::shared_ptr<TextContents>& text_contents,
420 Entity& entity,
421 const Paint& paint);
422
423 RenderPass& GetCurrentRenderPass() const;
424
425 Canvas(const Canvas&) = delete;
426
427 Canvas& operator=(const Canvas&) = delete;
428 };
429
430 } // namespace impeller
431
432 #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:1024
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:2092
impeller::Canvas::Canvas
Canvas(ContentContext &renderer, const RenderTarget &render_target, bool is_onscreen, bool requires_readback)
Definition: canvas.cc:284
impeller::Canvas::RequiresReadback
bool RequiresReadback() const
Definition: canvas.h:269
impeller::Canvas::DrawRoundSuperellipse
void DrawRoundSuperellipse(const RoundSuperellipse &rse, const Paint &paint)
Definition: canvas.cc:973
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:1402
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:1439
impeller::Canvas::GetCurrentTransform
const Matrix & GetCurrentTransform() const
Definition: canvas.cc:358
impeller::Canvas::DrawVertices
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
Definition: canvas.cc:1203
impeller::Canvas::DrawOval
void DrawOval(const Rect &rect, const Paint &paint)
Definition: canvas.cc:832
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:1138
impeller::Canvas::RestoreToCount
void RestoreToCount(size_t count)
Definition: canvas.cc:405
impeller::Canvas::Restore
bool Restore()
Definition: canvas.cc:1677
impeller::Canvas::GetSaveCount
size_t GetSaveCount() const
Definition: canvas.cc:397
impeller::Canvas::Concat
void Concat(const Matrix &transform)
Definition: canvas.cc:342
impeller::Canvas::Transform
void Transform(const Matrix &transform)
Definition: canvas.cc:354
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:785
impeller::Canvas::DrawDiffRoundRect
void DrawDiffRoundRect(const RoundRect &outer, const RoundRect &inner, const Paint &paint)
Definition: canvas.cc:957
impeller::Canvas::DrawPath
void DrawPath(const flutter::DlPath &path, const Paint &paint)
Definition: canvas.cc:413
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:346
impeller::Canvas::Rotate
void Rotate(Radians radians)
Definition: canvas.cc:378
impeller::Canvas::DrawPoints
void DrawPoints(const Point points[], uint32_t count, Scalar radius, const Paint &paint, PointStyle point_style)
Definition: canvas.cc:1106
impeller::Canvas::ResetTransform
void ResetTransform()
Definition: canvas.cc:350
impeller::Canvas::DrawTextFrame
void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
Definition: canvas.cc:1869
impeller::Canvas::DrawImage
void DrawImage(const std::shared_ptr< Texture > &image, Point offset, const Paint &paint, const SamplerDescriptor &sampler={})
Definition: canvas.cc:1124
impeller::Canvas::DrawPaint
void DrawPaint(const Paint &paint)
Definition: canvas.cc:433
impeller::Canvas::EndReplay
void EndReplay()
Definition: canvas.cc:2291
impeller::Canvas::DrawRoundRect
void DrawRoundRect(const RoundRect &rect, const Paint &paint)
Definition: canvas.cc:925
impeller::Canvas::Skew
void Skew(Scalar sx, Scalar sy)
Definition: canvas.cc:374
impeller::Canvas::~Canvas
~Canvas()=default
impeller::Canvas::Scale
void Scale(const Vector2 &scale)
Definition: canvas.cc:366
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:1385
impeller::Canvas::SupportsBlitToOnscreen
bool SupportsBlitToOnscreen() const
Definition: canvas.cc:2215
impeller::Canvas::DrawRect
void DrawRect(const Rect &rect, const Paint &paint)
Definition: canvas.cc:811
impeller::Canvas::EnsureFinalMipmapGeneration
bool EnsureFinalMipmapGeneration() const
Definition: canvas.cc:2273
impeller::Canvas::DrawAtlas
void DrawAtlas(const std::shared_ptr< AtlasContents > &atlas_contents, const Paint &paint)
Definition: canvas.cc:1317
impeller::Canvas::DrawLine
void DrawLine(const Point &p0, const Point &p1, const Paint &paint, bool reuse_depth=false)
Definition: canvas.cc:763
impeller::Canvas::Translate
void Translate(const Vector3 &offset)
Definition: canvas.cc:362
impeller::Canvas::DrawCircle
void DrawCircle(const Point &center, Scalar radius, const Paint &paint)
Definition: canvas.cc:995
impeller::Canvas::DrawArc
void DrawArc(const Arc &arc, const Paint &paint)
Definition: canvas.cc:873
impeller::ContentContext
Definition: content_context.h:122
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:2319
impeller::LazyRenderingConfig::IsApplyingClearColor
bool IsApplyingClearColor() const
Whether or not the clear color texture can still be updated.
Definition: canvas.cc:2327
impeller::LazyRenderingConfig::GetEntityPassTarget
EntityPassTarget * GetEntityPassTarget() const
Definition: canvas.cc:2331
impeller::LazyRenderingConfig::LazyRenderingConfig
LazyRenderingConfig(LazyRenderingConfig &&)=default
impeller::LazyRenderingConfig::GetInlinePassContext
InlinePassContext * GetInlinePassContext() const
Definition: canvas.cc:2335
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:312
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:425
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...
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::Sigma
In filters that use Gaussian distributions, "sigma" is a size of one standard deviation in terms of t...
Definition: sigma.h:32
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