Skip to content

Commit 4fb10e6

Browse files
committed
90.644% zTrack: restore UnloadSection helper ownership
1 parent cd8b330 commit 4fb10e6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Speed/Indep/Src/World/TrackStreamer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,16 +937,17 @@ bool TrackStreamer::WillUnloadBlock(TrackStreamingSection *section) {
937937
}
938938

939939
void TrackStreamer::UnloadSection(TrackStreamingSection *section) {
940+
ProfileNode profile_node(section->SectionName, 0);
940941
if (section->Status == TrackStreamingSection::ACTIVATED) {
941942
UnactivateSection(section);
942943
}
943944

944945
if (section->Status == TrackStreamingSection::LOADED) {
945946
if (WillUnloadBlock(section)) {
946-
WaitForFrameBufferSwapDisabled = 1;
947+
DisableWaitForFrameBufferSwap();
947948
eWaitUntilRenderingDone();
948-
WaitForFrameBufferSwapDisabled = 0;
949-
LastWaitUntilRenderingDoneFrameCount = eFrameCounter;
949+
EnableWaitForFrameBufferSwap();
950+
LastWaitUntilRenderingDoneFrameCount = eGetFrameCounter();
950951
}
951952

952953
section->UnactivatedFrameCount = 0;

0 commit comments

Comments
 (0)