12#include "third_party/skia/include/core/SkCanvas.h"
13#include "third_party/skia/include/core/SkSurface.h"
18 bool render_to_surface)
20 render_to_surface_(render_to_surface),
21 weak_factory_(this) {}
27 return delegate_ !=
nullptr;
38 if (!render_to_surface_) {
39 return std::make_unique<SurfaceFrame>(
40 nullptr, framebuffer_info,
44 [](
const SurfaceFrame& surface_frame) {
return true; }, logical_size);
55 if (backing_store ==
nullptr) {
59 if (
size.width != backing_store->width() ||
60 size.height != backing_store->height()) {
67 SkCanvas* canvas = backing_store->getCanvas();
68 canvas->resetMatrix();
74 if (!
self || !
self->IsValid() || canvas ==
nullptr) {
87 return self->delegate_->PresentBackingStore(
88 surface_frame.SkiaSurface());
91 return std::make_unique<SurfaceFrame>(backing_store, framebuffer_info,
92 encode_callback, submit_callback,
Developer-facing API for rendering anything within the engine.
Interface implemented by all platform surfaces that can present a software backing store to the "scre...
virtual sk_sp< SkSurface > AcquireBackingStore(const DlISize &size)=0
Called when the GPU surface needs a new buffer to render a new frame into.
DlMatrix GetRootTransformation() const override
~GPUSurfaceSoftware() override
GrDirectContext * GetContext() override
GPUSurfaceSoftware(GPUSurfaceSoftwareDelegate *delegate, bool render_to_surface)
std::unique_ptr< SurfaceFrame > AcquireFrame(const DlISize &size) override
std::function< bool(SurfaceFrame &surface_frame, DlCanvas *canvas)> EncodeCallback
std::function< bool(SurfaceFrame &surface_frame)> SubmitCallback
impeller::Matrix DlMatrix
impeller::ISize32 DlISize
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
A 4x4 matrix using column-major storage.