#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 () |
| 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) |
| 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 40 of file experimental_canvas.h.
| impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
| RenderTarget & | render_target, | ||
| bool | requires_readback | ||
| ) |
Definition at line 109 of file experimental_canvas.cc.
| impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
| RenderTarget & | render_target, | ||
| bool | requires_readback, | ||
| Rect | cull_rect | ||
| ) |
Definition at line 121 of file experimental_canvas.cc.
| impeller::ExperimentalCanvas::ExperimentalCanvas | ( | ContentContext & | renderer, |
| RenderTarget & | render_target, | ||
| bool | requires_readback, | ||
| IRect | cull_rect | ||
| ) |
Definition at line 134 of file experimental_canvas.cc.
|
overridedefault |
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 558 of file experimental_canvas.cc.
References impeller::Canvas::GetClipHeight(), impeller::Canvas::GetCurrentTransform(), impeller::Paint::kStroke, impeller::Matrix::MakeTranslation(), paint, impeller::Entity::SetBlendMode(), impeller::Entity::SetClipDepth(), impeller::Entity::SetContents(), and impeller::Entity::SetTransform().
| void impeller::ExperimentalCanvas::EndReplay | ( | ) |
Definition at line 745 of file experimental_canvas.cc.
References impeller::ContentContext::GetRenderTargetCache(), impeller::Canvas::initial_cull_rect_, impeller::Canvas::Initialize(), and impeller::Canvas::Reset().
Referenced by impeller::ExperimentalDlDispatcher::FinishRecording().
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 416 of file experimental_canvas.cc.
References impeller::EntityPassClipStack::ApplyClipState(), impeller::Paint::blend_mode, impeller::EntityPassClipStack::ClipStateResult::clip_did_change, impeller::Contents::ClipCoverage::coverage, impeller::ExperimentalCanvas::SaveLayerState::coverage, impeller::PaintPassDelegate::CreateContentsForSubpassTarget(), impeller::Canvas::current_depth_, impeller::EntityPassClipStack::CurrentClipCoverage(), impeller::Entity::GetBlendMode(), impeller::Entity::GetClipCoverage(), impeller::Canvas::GetClipHeight(), impeller::Canvas::GetCurrentTransform(), impeller::ContentContext::GetDeviceCapabilities(), impeller::TRect< T >::GetOrigin(), impeller::Entity::kLastPipelineBlendMode, impeller::kSourceOver, impeller::Entity::kSubpassAppendSnapshotTransform, impeller::Entity::kSubpassPrependSnapshotTransform, impeller::Matrix::MakeTranslation(), impeller::ExperimentalCanvas::SaveLayerState::paint, impeller::EntityPassClipStack::PopSubpass(), impeller::Entity::Render(), impeller::Entity::SetBlendMode(), impeller::Entity::SetClipDepth(), impeller::SetClipScissor(), impeller::Entity::SetContents(), impeller::Entity::SetTransform(), impeller::EntityPassClipStack::ClipStateResult::should_render, impeller::Capabilities::SupportsFramebufferFetch(), impeller::Canvas::transform_stack_, and VALIDATION_LOG.
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 193 of file experimental_canvas.cc.
References impeller::Canvas::current_depth_, impeller::Entity::kDirect, impeller::CanvasStackEntry::transform, and impeller::Canvas::transform_stack_.
Referenced by SaveLayer().
|
overridevirtual |
Reimplemented from impeller::Canvas.
Definition at line 207 of file experimental_canvas.cc.
References impeller::Color::alpha, impeller::Color::BlackTransparent(), impeller::Paint::CanApplyOpacityPeephole(), impeller::CanvasStackEntry::clip_depth, impeller::CanvasStackEntry::clip_height, impeller::Paint::color, impeller::CreateRenderTarget(), impeller::CanvasStackEntry::cull_rect, impeller::Canvas::current_depth_, impeller::EntityPassClipStack::CurrentClipCoverage(), impeller::Canvas::GetClipHeight(), impeller::ContentContext::GetContext(), impeller::Canvas::GetCurrentTransform(), impeller::RenderTarget::GetRenderTargetSize(), impeller::EntityPassClipStack::GetReplayEntities(), impeller::TRect< T >::GetSize(), impeller::EntityPassClipStack::HasCoverage(), impeller::TRect< T >::Intersection(), impeller::TRect< T >::IntersectsWithRect(), impeller::kSource, impeller::Entity::kSubpassAppendSnapshotTransform, impeller::Entity::kSubpassPrependSnapshotTransform, impeller::FilterInput::Make(), impeller::TRect< Scalar >::MakeOriginSize(), impeller::TextureContents::MakeRect(), impeller::TRect< Scalar >::MakeSize(), impeller::Matrix::MakeTranslation(), paint, impeller::EntityPassClipStack::PushSubpass(), impeller::Entity::Render(), impeller::CanvasStackEntry::rendering_mode, Save(), impeller::Entity::SetBlendMode(), impeller::Entity::SetClipDepth(), impeller::SetClipScissor(), impeller::Entity::SetContents(), impeller::Entity::SetTransform(), impeller::CanvasStackEntry::transform, impeller::Canvas::transform_stack_, impeller::TRect< T >::TransformBounds(), and VALIDATION_LOG.