Header cleanup.
This commit is contained in:
@@ -22,9 +22,7 @@ void Profiler::Initialize() {
|
||||
MicroProfileSetDisplayMode(1);
|
||||
}
|
||||
|
||||
void Profiler::Dump() {
|
||||
MicroProfileDumpTimers();
|
||||
}
|
||||
void Profiler::Dump() { MicroProfileDumpTimers(); }
|
||||
|
||||
void Profiler::Shutdown() {
|
||||
display_.reset();
|
||||
@@ -41,31 +39,29 @@ void Profiler::ThreadEnter(const char* name) {
|
||||
MicroProfileOnThreadCreate(name);
|
||||
}
|
||||
|
||||
void Profiler::ThreadExit() {
|
||||
MicroProfileOnThreadExit();
|
||||
}
|
||||
void Profiler::ThreadExit() { MicroProfileOnThreadExit(); }
|
||||
|
||||
bool Profiler::OnKeyDown(int key_code) {
|
||||
// http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
||||
switch (key_code) {
|
||||
case VK_TAB:
|
||||
MicroProfileToggleDisplayMode();
|
||||
return true;
|
||||
case VK_OEM_3: // `
|
||||
MicroProfileTogglePause();
|
||||
return true;
|
||||
case 0x31: // 1
|
||||
MicroProfileModKey(1);
|
||||
return true;
|
||||
case VK_TAB:
|
||||
MicroProfileToggleDisplayMode();
|
||||
return true;
|
||||
case VK_OEM_3: // `
|
||||
MicroProfileTogglePause();
|
||||
return true;
|
||||
case 0x31: // 1
|
||||
MicroProfileModKey(1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Profiler::OnKeyUp(int key_code) {
|
||||
switch (key_code) {
|
||||
case 0x31: // 1
|
||||
MicroProfileModKey(0);
|
||||
return true;
|
||||
case 0x31: // 1
|
||||
MicroProfileModKey(0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -74,13 +70,9 @@ void Profiler::OnMouseDown(bool left_button, bool right_button) {
|
||||
MicroProfileMouseButton(left_button, right_button);
|
||||
}
|
||||
|
||||
void Profiler::OnMouseUp() {
|
||||
MicroProfileMouseButton(0, 0);
|
||||
}
|
||||
void Profiler::OnMouseUp() { MicroProfileMouseButton(0, 0); }
|
||||
|
||||
void Profiler::OnMouseMove(int x, int y) {
|
||||
MicroProfileMousePosition(x, y, 0);
|
||||
}
|
||||
void Profiler::OnMouseMove(int x, int y) { MicroProfileMousePosition(x, y, 0); }
|
||||
|
||||
void Profiler::OnMouseWheel(int x, int y, int dy) {
|
||||
MicroProfileMousePosition(x, y, dy);
|
||||
@@ -124,34 +116,26 @@ void Profiler::Present() {}
|
||||
|
||||
#if XE_OPTION_PROFILING
|
||||
|
||||
uint32_t MicroProfileGpuInsertTimeStamp() {
|
||||
return 0;
|
||||
}
|
||||
uint32_t MicroProfileGpuInsertTimeStamp() { return 0; }
|
||||
|
||||
uint64_t MicroProfileGpuGetTimeStamp(uint32_t nKey) {
|
||||
return 0;
|
||||
}
|
||||
uint64_t MicroProfileGpuGetTimeStamp(uint32_t nKey) { return 0; }
|
||||
|
||||
uint64_t MicroProfileTicksPerSecondGpu() {
|
||||
return 0;
|
||||
}
|
||||
uint64_t MicroProfileTicksPerSecondGpu() { return 0; }
|
||||
|
||||
const char* MicroProfileGetThreadName() {
|
||||
return "TODO: get thread name!";
|
||||
}
|
||||
const char* MicroProfileGetThreadName() { return "TODO: get thread name!"; }
|
||||
|
||||
void MicroProfileDrawBox(int nX, int nY, int nX1, int nY1, uint32_t nColor, MicroProfileBoxType type) {
|
||||
void MicroProfileDrawBox(int nX, int nY, int nX1, int nY1, uint32_t nColor,
|
||||
MicroProfileBoxType type) {
|
||||
auto display = xe::Profiler::display();
|
||||
if (!display) {
|
||||
return;
|
||||
}
|
||||
display->DrawBox(
|
||||
nX, nY, nX1, nY1,
|
||||
nColor,
|
||||
static_cast<xe::ProfilerDisplay::BoxType>(type));
|
||||
display->DrawBox(nX, nY, nX1, nY1, nColor,
|
||||
static_cast<xe::ProfilerDisplay::BoxType>(type));
|
||||
}
|
||||
|
||||
void MicroProfileDrawLine2D(uint32_t nVertices, float* pVertices, uint32_t nColor) {
|
||||
void MicroProfileDrawLine2D(uint32_t nVertices, float* pVertices,
|
||||
uint32_t nColor) {
|
||||
auto display = xe::Profiler::display();
|
||||
if (!display) {
|
||||
return;
|
||||
@@ -159,7 +143,8 @@ void MicroProfileDrawLine2D(uint32_t nVertices, float* pVertices, uint32_t nColo
|
||||
display->DrawLine2D(nVertices, pVertices, nColor);
|
||||
}
|
||||
|
||||
void MicroProfileDrawText(int nX, int nY, uint32_t nColor, const char* pText, uint32_t nLen) {
|
||||
void MicroProfileDrawText(int nX, int nY, uint32_t nColor, const char* pText,
|
||||
uint32_t nLen) {
|
||||
auto display = xe::Profiler::display();
|
||||
if (!display) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user