9#include "third_party/skia/include/core/SkBitmap.h"
10#include "third_party/skia/include/core/SkImage.h"
16static std::shared_ptr<DlColorSource> CreateCheckerboardShader(SkColor c1,
20 bm.allocN32Pixels(2 *
size, 2 *
size);
22 bm.eraseArea(SkIRect::MakeLTRB(0, 0,
size,
size), c2);
39 auto checkerboard_color =
40 SkColorSetARGB(64, rand() % 256, rand() % 256, rand() % 256);
45 CreateCheckerboardShader(checkerboard_color, 0x00000000, 12));
Developer-facing API for rendering anything within the engine.
virtual void ClipRect(const DlRect &rect, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false)=0
virtual void DrawPaint(const DlPaint &paint)=0
virtual void DrawRect(const DlRect &rect, const DlPaint &paint)=0
static std::shared_ptr< DlColorSource > MakeImage(const sk_sp< const DlImage > &image, DlTileMode horizontal_tile_mode, DlTileMode vertical_tile_mode, DlImageSampling sampling=DlImageSampling::kLinear, const DlMatrix *matrix=nullptr)
static sk_sp< DlImage > Make(const SkImage *image)
DlPaint & setColor(DlColor color)
DlPaint & setStrokeWidth(float width)
DlPaint & setDrawStyle(DlDrawStyle style)
DlPaint & setColorSource(std::nullptr_t source)
FlutterVulkanImage * image
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void DrawCheckerboard(DlCanvas *canvas, const DlRect &rect)
@ kStroke
strokes boundary of shapes