Decouple MicroProfileFlip from Profiler::Present (and start a new frame in XE_SWAP)
This commit is contained in:
parent
b696c645f5
commit
4335e41c14
|
@ -236,7 +236,6 @@ void Profiler::set_window(ui::Window* window) {
|
|||
|
||||
void Profiler::Present() {
|
||||
SCOPE_profile_cpu_f("internal");
|
||||
MicroProfileFlip();
|
||||
#if XE_OPTION_PROFILING_UI
|
||||
if (!window_ || !drawer_) {
|
||||
return;
|
||||
|
@ -247,6 +246,8 @@ void Profiler::Present() {
|
|||
#endif // XE_OPTION_PROFILING_UI
|
||||
}
|
||||
|
||||
void Profiler::Flip() { MicroProfileFlip(); }
|
||||
|
||||
#else
|
||||
|
||||
bool Profiler::is_enabled() { return false; }
|
||||
|
|
|
@ -168,6 +168,8 @@ class Profiler {
|
|||
static ui::MicroprofileDrawer* drawer() { return drawer_.get(); }
|
||||
// Presents the profiler to the bound display, if any.
|
||||
static void Present();
|
||||
// Starts a new frame on the profiler
|
||||
static void Flip();
|
||||
|
||||
private:
|
||||
static ui::Window* window_;
|
||||
|
|
|
@ -693,6 +693,8 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingBuffer* reader,
|
|||
|
||||
XELOGI("XE_SWAP");
|
||||
|
||||
Profiler::Flip();
|
||||
|
||||
// Xenia-specific VdSwap hook.
|
||||
// VdSwap will post this to tell us we need to swap the screen/fire an
|
||||
// interrupt.
|
||||
|
|
Loading…
Reference in New Issue