Comments (11)
For DRM this is a good reference:
https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset-vsync.c
from flutter-embedded-linux.
I'm implementing to add vsync support for Wayland, but I separed this issue into x11, drm, and wayland respectively.
from flutter-embedded-linux.
Thank you. Actually, I don't understand what to use FlutterEngineOnVsync for. Could you tell me the purpose of it?
from flutter-embedded-linux.
VSync can be understood as a timed interrupt. The system will send a VSync signal every time it can proceed, and the CPU/GPU will immediately process the rendering after receiving the signal. Therefore, in Flutter, when rendering is needed, we need to monitor the VSync signal, and when a VSync signal is generated, we can start GPU rendering. and if we don't set VsyncCallback in embedder, engine will set a default VsyncCallback which is 60 fps.
from flutter-embedded-linux.
Thank you. That's quite understandable. What should this embedder do is to prepare the API so that the user program or plugins can receive Vsync, right?
from flutter-embedded-linux.
FlutterProjectArgs args = {};
args.vsync_callback =
you should implement this callback,
When this callback is triggered, you need request vsync signal,
when receive vsync signal callback, you need call FlutterEngineOnVsync.
from flutter-embedded-linux.
Thanks. I'll implement vsync.
from flutter-embedded-linux.
By the way, is there any good way to detect Vsync on Linux platforms? I couldn't find it.
from flutter-embedded-linux.
from flutter-embedded-linux.
Thanks!
from flutter-embedded-linux.
In terms of Wayland backend, I think wp_presentation
is better than wl_callback_listener
. We can also get a refresh rate by using it. However, we don't call wl_surface_commit
because of using eglSwapBuffers
which is called from Flutter Engine. So, wp_presentation
events don't happen continuously every frame.
from flutter-embedded-linux.
Related Issues (20)
- Add Impeller support HOT 1
- Add FlutterEngineNotifyDisplayUpdate support HOT 2
- Debug - Can only start Dart VM service, not observatory HOT 1
- Support DRM-GBM Backend for IMX GPU Vivante 6 Driver HOT 4
- Atomic Modeset fails HOT 8
- waylnd: [FATAL:flutter/shell/common/display_manager.cc(32)] Check failed: displays_.empty(). HOT 14
- DRM mode on raspberry pi 4b Error: Couldn't find file "symbols/US" in include paths HOT 3
- "text_scaling_factor" should default to 1 if unset HOT 1
- Internal CI for Engine artifacts doesn't work HOT 2
- xdg_wm_base@11: error 4: xdg_surface buffer (1280 x 720) is larger than the configured fullscreen state (1024 x 600) HOT 3
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 1
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 16
- Does this project run without systemd? HOT 1
- Disconnecting mouse that is hovering over button on wayland client results in Segmentation fault HOT 4
- how to measure flutter performance on embedded device HOT 4
- Support multiple wl_seats for remote desktop sharing HOT 3
- Turning the display OFF/ON swaps the width and height of the application HOT 9
- Dart VM: Wrong full snapshot version, expected XXX, found YYY HOT 2
- Incorrect snapshot architecture HOT 7
- App crashes when non-ASCII characters are sent from input method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-embedded-linux.