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