5#include "flutter/display_list/skia/dl_sk_dispatcher.h"
7#include "flutter/display_list/dl_blend_mode.h"
8#include "flutter/display_list/skia/dl_sk_conversions.h"
9#include "flutter/display_list/skia/dl_sk_types.h"
10#include "flutter/fml/trace_event.h"
50 if (!
options.content_is_clipped() &&
options.can_distribute_opacity() &&
84 canvas_->
scale(sx, sy);
90 canvas_->
skew(sx, sy);
113 mwx, mwy, mwz, mwt));
161 SkScalar intervals[] = {on_length, off_length};
202 bool render_with_attributes) {
210 bool render_with_attributes,
220 bool render_with_attributes) {
224 auto skia_image =
image->skia_image();
239 bool render_with_attributes) {
243 auto skia_atlas =
atlas->skia_image();
261 !display_list->can_apply_group_opacity()) {
272 if (display_list->rtree()) {
275 display_list->Dispatch(dispatcher);
288 const std::shared_ptr<impeller::TextFrame>& text_frame,
298 bool transparentOccluder,
300 const SkScalar kAmbientAlpha = 0.039f;
303 uint32_t
flags = transparentOccluder
310 SkColor ambient_color, spot_color;
317 ambient_color, spot_color,
flags);
323 bool transparent_occluder,
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
@ kDirectionalLight_ShadowFlag
@ kTransparentOccluder_ShadowFlag
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawImageNine(const SkImage *image, const SkIRect ¢er, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
SkRect getLocalClipBounds() const
void drawPaint(const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void rotate(SkScalar degrees)
void restoreToCount(int saveCount)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawAtlas(const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
void setMatrix(const SkM44 &matrix)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
void skew(SkScalar sx, SkScalar sy)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
int saveLayerAlphaf(const SkRect *bounds, float alpha)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
bool asColorFilter(SkColorFilter **filterPtr) const
void setPathEffect(sk_sp< SkPathEffect > pathEffect)
SkImageFilter * getImageFilter() const
static void DrawShadow(SkCanvas *canvas, const SkPath &path, const SkPoint3 &zPlaneParams, const SkPoint3 &lightPos, SkScalar lightRadius, SkColor ambientColor, SkColor spotColor, uint32_t flags=SkShadowFlags::kNone_ShadowFlag)
static void ComputeTonalColors(SkColor inAmbientColor, SkColor inSpotColor, SkColor *outAmbientColor, SkColor *outSpotColor)
static constexpr SkScalar kShadowLightRadius
static constexpr SkScalar kShadowLightHeight
Backend implementation of |DlOpReceiver| for |SkCanvas|.
void drawPaint() override
void drawTextBlob(const sk_sp< SkTextBlob > blob, SkScalar x, SkScalar y) override
void drawTextFrame(const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y) override
void transform2DAffine(SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override
void drawPoints(PointMode mode, uint32_t count, const SkPoint pts[]) override
void drawImageNine(const sk_sp< DlImage > image, const SkIRect ¢er, const SkRect &dst, DlFilterMode filter, bool render_with_attributes) override
void drawDashedLine(const DlPoint &p0, const DlPoint &p1, DlScalar on_length, DlScalar off_length) override
void transformReset() override
const SkPaint * safe_paint(bool use_attributes)
void drawRRect(const SkRRect &rrect) override
void drawCircle(const SkPoint ¢er, SkScalar radius) override
void drawPath(const SkPath &path) override
void drawArc(const SkRect &bounds, SkScalar start, SkScalar sweep, bool useCenter) override
void drawShadow(const SkPath &path, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override
void drawImage(const sk_sp< DlImage > image, const SkPoint point, DlImageSampling sampling, bool render_with_attributes) override
void drawOval(const SkRect &bounds) override
void clipRect(const SkRect &rect, ClipOp clip_op, bool is_aa) override
void rotate(SkScalar degrees) override
void translate(SkScalar tx, SkScalar ty) override
void drawColor(DlColor color, DlBlendMode mode) override
void drawDisplayList(const sk_sp< DisplayList > display_list, SkScalar opacity) override
static void DrawShadow(SkCanvas *canvas, const SkPath &path, DlColor color, float elevation, bool transparentOccluder, SkScalar dpr)
void drawLine(const SkPoint &p0, const SkPoint &p1) override
void drawVertices(const DlVertices *vertices, DlBlendMode mode) override
void skew(SkScalar sx, SkScalar sy) override
void drawRect(const SkRect &rect) override
void transformFullPerspective(SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt) override
void clipPath(const SkPath &path, ClipOp clip_op, bool is_aa) override
void drawAtlas(const sk_sp< DlImage > atlas, const SkRSXform xform[], const SkRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const SkRect *cullRect, bool render_with_attributes) override
void saveLayer(const SkRect &bounds, const SaveLayerOptions options, const DlImageFilter *backdrop) override
void clipRRect(const SkRRect &rrect, ClipOp clip_op, bool is_aa) override
void scale(SkScalar sx, SkScalar sy) override
void drawDRRect(const SkRRect &outer, const SkRRect &inner) override
void drawImageRect(const sk_sp< DlImage > image, const SkRect &src, const SkRect &dst, DlImageSampling sampling, bool render_with_attributes, SrcRectConstraint constraint) override
const SkPaint & paint(bool uses_shader=true)
void save_opacity(SkScalar opacity_for_children)
SkScalar combined_opacity()
Holds all of the data (both required and optional) for a DisplayList drawVertices call.
FlutterSemanticsFlag flags
#define FML_CHECK(condition)
sk_sp< const SkImage > atlas
Optional< SkRect > bounds
sk_sp< const SkImage > image
sk_sp< const SkImageFilter > backdrop
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SkSamplingOptions sampling
impeller::Scalar DlScalar
SkPaint ToSk(const DlPaint &paint)
const SkPoint & ToSkPoint(const DlPoint &point)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z)
#define TRACE_EVENT0(category_group, name)