[fgviewer] Add graphviz view mode to the web page (#8673)
* Export graphviz data to the webview * Fix some errors * Fix colors * Only show toggle when view selected * Update * Merge graphviz data into json string * Mark export_graphviz function as const * Set SERVE_FROM_SOURCE_TREE to 0 * Remove unnecessary import * Refactor * Refactor * New line when early return
This commit is contained in:
@@ -31,6 +31,7 @@ FrameGraphInfo::~FrameGraphInfo() = default;
|
||||
FrameGraphInfo::FrameGraphInfo(FrameGraphInfo&& rhs) noexcept = default;
|
||||
|
||||
bool FrameGraphInfo::operator==(const FrameGraphInfo& rhs) const {
|
||||
// We skip checking graphviz here since checking passes and resources should be enough.
|
||||
return viewName == rhs.viewName
|
||||
&& passes == rhs.passes
|
||||
&& resources == rhs.resources;
|
||||
@@ -66,6 +67,10 @@ void FrameGraphInfo::setPasses(std::vector<Pass> sortedPasses) {
|
||||
passes = std::move(sortedPasses);
|
||||
}
|
||||
|
||||
void FrameGraphInfo::setGraphvizData(utils::CString data) {
|
||||
graphvizData = std::move(data);
|
||||
}
|
||||
|
||||
const char* FrameGraphInfo::getViewName() const {
|
||||
return viewName.c_str_safe();
|
||||
}
|
||||
@@ -79,4 +84,8 @@ const std::unordered_map<ResourceId, FrameGraphInfo::Resource>&
|
||||
return resources;
|
||||
}
|
||||
|
||||
const char* FrameGraphInfo::getGraphvizData() const {
|
||||
return graphvizData.c_str_safe();
|
||||
}
|
||||
|
||||
} // namespace filament::fgviewer
|
||||
|
||||
Reference in New Issue
Block a user