-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Depends on #8344] Implement ApiHandler functions and add JsonWriter #8379
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # libs/fgviewer/include/fgviewer/DebugServer.h # libs/fgviewer/include/fgviewer/FrameGraphInfo.h # libs/fgviewer/src/FrameGraphInfo.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some question around mCurrentStatus
libs/fgviewer/src/ApiHandler.h
Outdated
// This variable is to implement a *hanging* effect for /api/status. The call to /api/status | ||
// will always block until statusMaterialId is updated again. The client is expected to keep | ||
// calling /api/status (a constant "pull" to simulate a push). | ||
std::atomic<uint64_t> mCurrentStatus = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this needs to be an atomic since it's protected by the mutex? Also I don't see it being updated anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we might not need to make it atomic. I've updated the code.
Also, I add the call to updateFrameGraph
when a view is created and updated, and it will only be updated when the content of the info is changed.
# Conflicts: # filament/src/details/Engine.cpp
This PR should be merged after #8344 is in.
ApiHandler
GET /api/framegraphs
: for getting all active frame graph infoGET /api/framegraph?fg={fgid}
: for getting specific view's frame graph infoGET /api/status
: for long polling, notify the client if there's any view's frame graph updatedJsonWriter
class for convertingFrameGraphInfo
to json format