Flutter Engine
The Flutter Engine
|
#include <experimental_canvas.h>
Classes | |
struct | SaveLayerState |
Public Member Functions | |
ExperimentalCanvas (ContentContext &renderer, RenderTarget &render_target, bool requires_readback) | |
ExperimentalCanvas (ContentContext &renderer, RenderTarget &render_target, bool requires_readback, Rect cull_rect) | |
ExperimentalCanvas (ContentContext &renderer, RenderTarget &render_target, bool requires_readback, IRect cull_rect) | |
~ExperimentalCanvas () override=default | |
void | Save (uint32_t total_content_depth) override |
void | SaveLayer (const Paint &paint, std::optional< Rect > bounds, const std::shared_ptr< ImageFilter > &backdrop_filter, ContentBoundsPromise bounds_promise, uint32_t total_content_depth, bool can_distribute_opacity) override |
bool | Restore () override |
void | EndReplay () |
void | DrawTextFrame (const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint) override |
Public Member Functions inherited from impeller::Canvas | |
Canvas () | |
Canvas (Rect cull_rect) | |
Canvas (IRect cull_rect) | |
virtual | ~Canvas () |
virtual void | Save (uint32_t total_content_depth=kMaxDepth) |
virtual void | SaveLayer (const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr, ContentBoundsPromise bounds_promise=ContentBoundsPromise::kUnknown, uint32_t total_content_depth=kMaxDepth, bool can_distribute_opacity=false) |
virtual bool | Restore () |
size_t | GetSaveCount () const |
void | RestoreToCount (size_t count) |
const Matrix & | GetCurrentTransform () const |
const std::optional< Rect > | GetCurrentLocalCullingBounds () const |
void | ResetTransform () |
void | Transform (const Matrix &transform) |
void | Concat (const Matrix &transform) |
void | PreConcat (const Matrix &transform) |
void | Translate (const Vector3 &offset) |
void | Scale (const Vector2 &scale) |
void | Scale (const Vector3 &scale) |
void | Skew (Scalar sx, Scalar sy) |
void | Rotate (Radians radians) |
void | DrawPath (const Path &path, const Paint &paint) |
void | DrawPaint (const Paint &paint) |
void | DrawLine (const Point &p0, const Point &p1, const Paint &paint) |
void | DrawRect (const Rect &rect, const Paint &paint) |
void | DrawOval (const Rect &rect, const Paint &paint) |
void | DrawRRect (const Rect &rect, const Size &corner_radii, const Paint &paint) |
void | DrawCircle (const Point ¢er, Scalar radius, const Paint &paint) |
void | DrawPoints (std::vector< Point > points, Scalar radius, const Paint &paint, PointStyle point_style) |
void | DrawImage (const std::shared_ptr< Image > &image, Point offset, const Paint &paint, SamplerDescriptor sampler={}) |
void | DrawImageRect (const std::shared_ptr< Image > &image, Rect source, Rect dest, const Paint &paint, SamplerDescriptor sampler={}, SourceRectConstraint src_rect_constraint=SourceRectConstraint::kFast) |
void | ClipPath (const Path &path, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect) |
void | ClipRect (const Rect &rect, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect) |
void | ClipOval (const Rect &bounds, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect) |
void | ClipRRect (const Rect &rect, const Size &corner_radii, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect) |
virtual void | DrawTextFrame (const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint) |
void | DrawVertices (const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint) |
void | DrawAtlas (const std::shared_ptr< Image > &atlas, std::vector< Matrix > transforms, std::vector< Rect > texture_coordinates, std::vector< Color > colors, BlendMode blend_mode, SamplerDescriptor sampler, std::optional< Rect > cull_rect, const Paint &paint) |
Picture | EndRecordingAsPicture () |
Additional Inherited Members | |
Static Public Attributes inherited from impeller::Canvas | |
static constexpr uint32_t | kMaxDepth = 1 << 24 |
Protected Member Functions inherited from impeller::Canvas | |
size_t | GetClipHeight () const |
void | Initialize (std::optional< Rect > cull_rect) |
void | Reset () |
Protected Attributes inherited from impeller::Canvas | |
std::deque< CanvasStackEntry > | transform_stack_ |
std::optional< Rect > | initial_cull_rect_ |
uint64_t | current_depth_ = 0u |
This Canvas attempts to translate from display lists to draw calls directly.
It's not fully implemented yet but if successful it will be replacing the aiks Canvas functionality.
See also:
Definition at line 28 of file experimental_canvas.h.
impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
RenderTarget & | render_target, | ||
bool | requires_readback | ||
) |
Definition at line 110 of file experimental_canvas.cc.
impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
RenderTarget & | render_target, | ||
bool | requires_readback, | ||
Rect | cull_rect | ||
) |
Definition at line 122 of file experimental_canvas.cc.
impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
RenderTarget & | render_target, | ||
bool | requires_readback, | ||
IRect | cull_rect | ||
) |
Definition at line 135 of file experimental_canvas.cc.
|
overridedefault |
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 381 of file experimental_canvas.cc.
void impeller::ExperimentalCanvas::EndReplay | ( | ) |
Definition at line 553 of file experimental_canvas.cc.
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 265 of file experimental_canvas.cc.
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 192 of file experimental_canvas.cc.
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 206 of file experimental_canvas.cc.