51 {
54 return nullptr;
55 }
56
58 FML_LOG(
ERROR) <<
"Vulkan surface was asked for an empty frame.";
59 return nullptr;
60 }
61
63 std::unique_ptr<impeller::Surface>
surface = context_vk.AcquireNextSurface();
64
67 return nullptr;
68 }
69
72 aiks_context = aiks_context_,
74 ](SurfaceFrame& surface_frame, DlCanvas* canvas) mutable -> bool {
75 if (!aiks_context) {
76 return false;
77 }
78
79 auto display_list = surface_frame.BuildDisplayList();
80 if (!display_list) {
81 FML_LOG(
ERROR) <<
"Could not build display list for surface frame.";
82 return false;
83 }
84
85 auto cull_rect =
86 surface->GetTargetRenderPassDescriptor().GetRenderTargetSize();
87
92 -> bool {
93#if ENABLE_EXPERIMENTAL_CANVAS
96 display_list->Dispatch(
97 collector,
100 aiks_context->GetContentContext(), render_target,
103 display_list->Dispatch(
104 impeller_dispatcher,
106 impeller_dispatcher.FinishRecording();
107 aiks_context->GetContentContext().GetTransientsBuffer().Reset();
108 aiks_context->GetContentContext()
109 .GetLazyGlyphAtlas()
110 ->ResetTextFrames();
111 return true;
112#else
115 display_list->Dispatch(
116 impeller_dispatcher,
118 auto picture = impeller_dispatcher.EndRecordingAsPicture();
119
120 return aiks_context->Render(picture, render_target,
121 true);
122#endif
123 }));
124 });
125
126 return std::make_unique<SurfaceFrame>(
127 nullptr,
128 SurfaceFrame::FramebufferInfo{},
129 submit_callback,
131 nullptr,
132 true
133 );
134}
std::function< bool(SurfaceFrame &surface_frame, DlCanvas *canvas)> SubmitCallback
static SurfaceContextVK & Cast(Context &base)
Performs a first pass over the display list to collect all text frames.
#define FML_LOG(severity)
sk_sp< const SkPicture > picture
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 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
internal::CopyableLambda< T > MakeCopyable(T lambda)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
A 4x4 matrix using column-major storage.
RoundOut(const TRect< U > &r)
static constexpr TRect MakeSize(const TSize< U > &size)