Skip to content

Commit 4462619

Browse files
committed
feedback - not to call FrameInfoManager for standalone rendering
1 parent 54494eb commit 4462619

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

filament/src/FrameInfo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ class FrameInfoManager {
163163
// call this immediately before "swap buffers"
164164
void endFrame(backend::DriverApi& driver) noexcept;
165165

166-
details::FrameInfo const& getLastFrameInfo() const noexcept {
167-
// if pFront is not set yet, return front() but in this case front().valid will be false
168-
return pFront ? *pFront : mFrameTimeHistory.front();
166+
details::FrameInfo const getLastFrameInfo() const noexcept {
167+
// if pFront is not set yet, return FrameInfo(). But the `valid` field will be false in this case.
168+
return pFront ? *pFront : details::FrameInfo();
169169
}
170170

171171
utils::FixedCapacityVector<Renderer::FrameInfo> getFrameInfoHistory(size_t historySize) const noexcept;

filament/src/details/Renderer.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -525,16 +525,8 @@ void FRenderer::renderStandaloneView(FView const* view) {
525525
1'000'000'000.0 / mDisplayInfo.refreshRate),
526526
mFrameId);
527527

528-
// This need to occur after the backend beginFrame() because some backends need to start
529-
// a command buffer before creating a fence.
530-
mFrameInfoManager.beginFrame(driver, {
531-
.historySize = mFrameRateOptions.history
532-
}, mFrameId);
533-
534528
renderInternal(view);
535529

536-
mFrameInfoManager.endFrame(driver);
537-
538530
driver.endFrame(mFrameId);
539531
}
540532
}

0 commit comments

Comments
 (0)