12#include "third_party/skia/include/gpu/ganesh/gl/GrGLInterface.h"
23 <<
"This platform does not provide a Vsync waiter implementation. A "
24 "simple timer based fallback is being used.";
29 std::unique_ptr<PlatformMessage>
message) {
34 std::unique_ptr<PointerDataPacket> packet) {
60 std::unique_ptr<Surface>
surface;
68 surface = platform_view->CreateRenderingSurface();
69 if (surface && !surface->IsValid()) {
76 FML_LOG(ERROR) <<
"Failed to create platform view rendering surface";
79 delegate_.OnPlatformViewCreated(std::move(surface));
82void PlatformView::NotifyDestroyed() {
86void PlatformView::ScheduleFrame() {
90void PlatformView::AddView(int64_t
view_id,
102 delegate_.OnPlatformViewSendViewFocusEvent(event);
105sk_sp<GrDirectContext> PlatformView::CreateResourceContext()
const {
106 FML_DLOG(WARNING) <<
"This platform does not set up the resource "
107 "context on the IO thread for async texture uploads.";
111std::shared_ptr<impeller::Context> PlatformView::GetImpellerContext()
const {
115void PlatformView::ReleaseResourceContext()
const {}
119 return std::make_unique<DefaultPointerDataDispatcher>(delegate);
124 return weak_factory_.GetWeakPtr();
127void PlatformView::UpdateSemantics(
133void PlatformView::SetApplicationLocale(
137void PlatformView::SetSemanticsTreeEnabled(
141void PlatformView::SendChannelUpdate(
const std::string&
name,
bool listening) {}
143void PlatformView::HandlePlatformMessage(
144 std::unique_ptr<PlatformMessage>
message) {
145 if (
auto response =
message->response()) {
146 response->CompleteEmpty();
150void PlatformView::OnPreEngineRestart()
const {}
152void PlatformView::RegisterTexture(std::shared_ptr<flutter::Texture>
texture) {
160void PlatformView::MarkTextureFrameAvailable(int64_t
texture_id) {
164std::unique_ptr<Surface> PlatformView::CreateRenderingSurface() {
167 FML_DCHECK(
false) <<
"This platform does not provide a rendering surface but "
168 "it was notified of surface rendering surface creation.";
172std::shared_ptr<ExternalViewEmbedder>
173PlatformView::CreateExternalViewEmbedder() {
175 <<
"This platform doesn't support embedding external views.";
184 delegate_.OnPlatformViewSetNextFrameCallback(closure);
187std::unique_ptr<std::vector<std::string>>
188PlatformView::ComputePlatformResolvedLocales(
189 const std::vector<std::string>& supported_locale_data) {
190 std::unique_ptr<std::vector<std::string>> out =
191 std::make_unique<std::vector<std::string>>();
195void PlatformView::RequestDartDeferredLibrary(intptr_t loading_unit_id) {}
197void PlatformView::LoadDartDeferredLibrary(
198 intptr_t loading_unit_id,
199 std::unique_ptr<const fml::Mapping> snapshot_data,
200 std::unique_ptr<const fml::Mapping> snapshot_instructions) {}
202void PlatformView::LoadDartDeferredLibraryError(
203 intptr_t loading_unit_id,
208void PlatformView::UpdateAssetResolverByType(
209 std::unique_ptr<AssetResolver> updated_asset_resolver,
211 delegate_.UpdateAssetResolverByType(std::move(updated_asset_resolver),
type);
214std::unique_ptr<SnapshotSurfaceProducer>
215PlatformView::CreateSnapshotSurfaceProducer() {
219std::shared_ptr<PlatformMessageHandler>
220PlatformView::GetPlatformMessageHandler()
const {
225 return delegate_.OnPlatformViewGetSettings();
228double PlatformView::GetScaledFontSize(
double unscaled_font_size,
229 int configuration_id)
const {
236void PlatformView::RequestViewFocusChange(
AssetResolverType
Identifies the type of AssetResolver an instance is.
The interface for Engine to implement.
fml::RefPtr< fml::TaskRunner > GetRasterTaskRunner() const
A Mapping like NonOwnedMapping, but uses Free as its release proc.
static void RunNowOrPostTask(const fml::RefPtr< fml::TaskRunner > &runner, const fml::closure &task)
TaskRunners task_runners_
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
G_BEGIN_DECLS GBytes * message
G_BEGIN_DECLS FlutterViewId view_id
FlutterDesktopBinaryReply callback
#define FML_DLOG(severity)
#define FML_LOG(severity)
#define FML_UNREACHABLE()
#define FML_DCHECK(condition)
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
std::function< std::unique_ptr< PointerDataDispatcher >(PointerDataDispatcher::Delegate &)> PointerDataDispatcherMaker
Signature for constructing PointerDataDispatcher.
std::function< void()> closure