SL-18586 FIXED Crash when opening 360 snapshot

master
Mnikolenko Productengine 2022-11-09 14:42:27 +02:00
parent af675bbe63
commit 72b1cfc76b
4 changed files with 12 additions and 14 deletions

View File

@ -283,6 +283,7 @@ Beq Janus
SL-15709
SL-16021
SL-18202
SL-18586
Beth Walcher
Bezilon Kasei
Biancaluce Robbiani

View File

@ -319,13 +319,7 @@ const std::string LLFloater360Capture::getHTMLBaseFolder()
// triggered when the 'capture' button in the UI is pressed
void LLFloater360Capture::onCapture360ImagesBtn()
{
// launch the main capture code in a coroutine so we can
// yield/suspend at some points to give the main UI
// thread a look-in occasionally.
LLCoros::instance().launch("capture360cap", [this]()
{
capture360Images();
});
capture360Images();
}
// Gets the full path name for a given JavaScript file in the HTML folder. We
@ -680,9 +674,6 @@ void LLFloater360Capture::capture360Images()
mCaptureBtn->setEnabled(true);
mSaveLocalBtn->setEnabled(true);
// allow the UI to update by suspending and waiting for the
// main render loop to update the UI
suspendForAFrame();
}
// once the request is made to navigate to the web page containing the code

View File

@ -43,6 +43,8 @@ namespace LLPerfStats
U32 lastGlobalPrefChange{0};
std::mutex bufferToggleLock{};
F64 cpu_hertz{0.0};
Tunables tunables;
std::atomic<int> StatsRecorder::writeBuffer{0};
@ -126,6 +128,8 @@ namespace LLPerfStats
// create a queue
// create a thread to consume from the queue
tunables.initialiseFromSettings();
LLPerfStats::cpu_hertz = (F64)LLTrace::BlockTimer::countsPerSecond();
t.detach();
}
@ -332,7 +336,7 @@ namespace LLPerfStats
}
// The frametime budget we have based on the target FPS selected
auto target_frame_time_raw = (U64)llround((F64)LLTrace::BlockTimer::countsPerSecond()/(tunables.userTargetFPS==0?1:tunables.userTargetFPS));
auto target_frame_time_raw = (U64)llround(LLPerfStats::cpu_hertz/(tunables.userTargetFPS==0?1:tunables.userTargetFPS));
// LL_INFOS() << "Effective FPS(raw):" << tot_frame_time_raw << " Target:" << target_frame_time_raw << LL_ENDL;
auto inferredFPS{1000/(U32)std::max(raw_to_ms(tot_frame_time_raw),1.0)};
U32 settingsChangeFrequency{inferredFPS > 25?inferredFPS:25};

View File

@ -55,6 +55,8 @@ namespace LLPerfStats
static constexpr U32 TUNE_AVATARS_ONLY{0};
static constexpr U32 TUNE_SCENE_AND_AVATARS{1};
extern F64 cpu_hertz;
extern std::atomic<int64_t> tunedAvatars;
extern std::atomic<U64> renderAvatarMaxART_ns;
extern bool belowTargetFPS;
@ -398,9 +400,9 @@ namespace LLPerfStats
};
inline double raw_to_ns(U64 raw) { return (static_cast<double>(raw) * 1000000000.0) / (F64)LLTrace::BlockTimer::countsPerSecond(); };
inline double raw_to_us(U64 raw) { return (static_cast<double>(raw) * 1000000.0) / (F64)LLTrace::BlockTimer::countsPerSecond(); };
inline double raw_to_ms(U64 raw) { return (static_cast<double>(raw) * 1000.0) / (F64)LLTrace::BlockTimer::countsPerSecond(); };
inline double raw_to_ns(U64 raw) { return (static_cast<double>(raw) * 1000000000.0) / LLPerfStats::cpu_hertz; };
inline double raw_to_us(U64 raw) { return (static_cast<double>(raw) * 1000000.0) / LLPerfStats::cpu_hertz; };
inline double raw_to_ms(U64 raw) { return (static_cast<double>(raw) * 1000.0) / LLPerfStats::cpu_hertz; };
using RecordSceneTime = RecordTime<ObjType_t::OT_GENERAL>;
using RecordAvatarTime = RecordTime<ObjType_t::OT_AVATAR>;