Git Product home page Git Product logo

Comments (7)

stuartmorgan avatar stuartmorgan commented on April 28, 2024 2

flutter/flutter#16912 is the Flutter engine issue for changing message loop handling.

from flutter-desktop-embedding.

sjindel-google avatar sjindel-google commented on April 28, 2024 1

I am using this work-around currently:

    glfwWaitEventsTimeout(0.016);
    while (gtk_events_pending()) {
      gtk_main_iteration();
    }

from flutter-desktop-embedding.

stuartmorgan avatar stuartmorgan commented on April 28, 2024

__FlutterEngineFlushPendingTasksNow is related to receiving plugin messages, not drawing, so frame rate isn't the issue. We have no way of knowing how frequently plugins might message.

Significant changes are in the works to how the embedding API handles message loops, so I don't think there's any point in trying to tune the current implementation, which is basically a hack around the currently-missing functionality (note that we're calling a method with leading underscores and has a comment in the embedding API header that it will be removed).

from flutter-desktop-embedding.

pmatteo1998 avatar pmatteo1998 commented on April 28, 2024

with "i think that flutter engine has some sort of flag to comunicate when a new frame" i'm not referring to the "__FlutterEngineFlushPendingTasksNow" function but the functions used by dart part of flutter cuminicate with the engine asynchronously(with the message system of course).

from flutter-desktop-embedding.

stuartmorgan avatar stuartmorgan commented on April 28, 2024

Sorry, I'm not sure what communication system you are referring to, and I'm still not sure what relationship you think there is between frame availability and FlutterWindowLoop rate.

from flutter-desktop-embedding.

krisgiesing avatar krisgiesing commented on April 28, 2024

I think this suggestion might be about wanting to use glfwWaitEvents instead of glfwPollEvents inside FlutterWindowLoop. That might be tricky since the wait form might not know about the kind of events that __FlutterEngineFlushPendingTasksNow is meant to handle. If instead of __FlutterEngineFlushPendingTasksNow being called, the embedder could post an event to whatever glfwWaitEvents is monitoring, then we could probably implement a more efficient main loop.

from flutter-desktop-embedding.

vially avatar vially commented on April 28, 2024

Significant changes are in the works to how the embedding API handles message loops

@stuartmorgan
Is there an issue or a public channel where we can follow these discussions?

from flutter-desktop-embedding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.