* Introduce FrameGraphInfo class * Move the assignment into pimpl * Make ctors explicit * Add ctors to fg info structs * Revert the macro change to align with existing * Address the comments * Remove pimpl and move func def to .cc * Fix * Convert the FrameGraph to FrameGraphInfo * Initialize and update debug server on engine side * Fix compile error * Address the comments * Update * Use camelCase * Use camelCase * Update * Add JsonWriter to convert fginfo to json * Add getStatus api and implement it * Add increment * Implement GET apis * Fix compile error * Update * Use c_str_safe * Add operator== for FrameGraphInfo * Call updateFrameGraph in appropriate locations * Address the comments
This commit is contained in:
@@ -110,6 +110,7 @@ ViewHandle DebugServer::createView(utils::CString name) {
|
||||
std::unique_lock<utils::Mutex> lock(mViewsMutex);
|
||||
ViewHandle handle = mViewCounter++;
|
||||
mViews.emplace(handle, FrameGraphInfo(std::move(name)));
|
||||
mApiHandler->updateFrameGraph(handle);
|
||||
|
||||
return handle;
|
||||
}
|
||||
@@ -121,8 +122,19 @@ void DebugServer::destroyView(ViewHandle h) {
|
||||
|
||||
void DebugServer::update(ViewHandle h, FrameGraphInfo info) {
|
||||
std::unique_lock<utils::Mutex> lock(mViewsMutex);
|
||||
const auto it = mViews.find(h);
|
||||
if (it == mViews.end()) {
|
||||
slog.w << "[fgviewer] Received update for unknown handle " << h;
|
||||
return;
|
||||
}
|
||||
|
||||
bool has_changed = !(it->second == info);
|
||||
if (!has_changed)
|
||||
return;
|
||||
|
||||
mViews.erase(h);
|
||||
mViews.emplace(h, std::move(info));
|
||||
mApiHandler->updateFrameGraph(h);
|
||||
}
|
||||
|
||||
} // namespace filament::fgviewer
|
||||
|
||||
Reference in New Issue
Block a user