some renaming

This commit is contained in:
Irlan 2019-04-01 11:15:39 -03:00
parent f195e77be7
commit 2e4b7004c9
6 changed files with 19 additions and 19 deletions

View File

@ -137,12 +137,12 @@ static void Run()
g_profiler->EndScope();
g_recorderProfiler->BuildRecords();
g_profilerRecorder->BuildRecords();
if (g_settings->drawProfile)
{
records.Resize(0);
g_recorderProfiler->BuildSortedRecords(records);
g_profilerRecorder->BuildSortedRecords(records);
}
g_profiler->End();

View File

@ -26,7 +26,7 @@ Model::Model()
g_draw = &m_draw;
g_camera = &m_camera;
g_profiler = &m_profiler;
g_recorderProfiler = &m_recorderProfiler;
g_profilerRecorder = &m_profilerRecorder;
#if (PROFILE_JSON == 1)
g_profilerListener = &m_jsonListener;
@ -56,7 +56,7 @@ Model::~Model()
g_draw = nullptr;
g_camera = nullptr;
g_profiler = nullptr;
g_recorderProfiler = nullptr;
g_profilerRecorder = nullptr;
#if (PROFILE_JSON == 1)
g_profilerListener = nullptr;

View File

@ -21,10 +21,10 @@
#include <testbed/framework/draw.h>
#include <testbed/framework/profiler.h>
#include <testbed/framework/recorder_profiler.h>
#include <testbed/framework/profiler_recorder.h>
// Set to 1 to write profile events into a .json file. Set to 0 otherwise.
#define PROFILE_JSON 1
#define PROFILE_JSON 0
#if (PROFILE_JSON == 1)
#include <testbed\framework\json_profiler.h>
@ -71,7 +71,7 @@ private:
Draw m_draw;
Camera m_camera;
Profiler m_profiler;
RecorderProfiler m_recorderProfiler;
ProfilerRecorder m_profilerRecorder;
#if (PROFILE_JSON == 1)
JsonProfiler m_jsonListener;

View File

@ -59,7 +59,7 @@ public:
// End the top scope.
void EndScope();
private:
friend class RecorderProfiler;
friend class ProfilerRecorder;
ProfilerNode* CreateNode();
void DestroyNode(ProfilerNode* node);

View File

@ -16,12 +16,12 @@
* 3. This notice may not be removed or altered from any source distribution.
*/
#include <testbed/framework/recorder_profiler.h>
#include <testbed/framework/profiler_recorder.h>
#include <testbed/framework/profiler.h>
RecorderProfiler* g_recorderProfiler = nullptr;
ProfilerRecorder* g_profilerRecorder = nullptr;
ProfilerRecord* RecorderProfiler::FindRecord(const char* name)
ProfilerRecord* ProfilerRecorder::FindRecord(const char* name)
{
for (u32 i = 0; i < m_records.Count(); ++i)
{
@ -34,7 +34,7 @@ ProfilerRecord* RecorderProfiler::FindRecord(const char* name)
return nullptr;
}
void RecorderProfiler::RecurseBuildRecords(ProfilerNode* node)
void ProfilerRecorder::RecurseBuildRecords(ProfilerNode* node)
{
ProfilerRecord* fr = FindRecord(node->name);
if (fr)
@ -66,7 +66,7 @@ void RecorderProfiler::RecurseBuildRecords(ProfilerNode* node)
}
}
void RecorderProfiler::BuildRecords()
void ProfilerRecorder::BuildRecords()
{
for (u32 i = 0; i < m_records.Count(); ++i)
{
@ -90,7 +90,7 @@ static ProfilerRecord* FindSortedRecord(b3Array<ProfilerRecord*>& records, const
return nullptr;
}
void RecorderProfiler::RecurseBuildSortedRecords(ProfilerNode* node, b3Array<ProfilerRecord*>& output)
void ProfilerRecorder::RecurseBuildSortedRecords(ProfilerNode* node, b3Array<ProfilerRecord*>& output)
{
ProfilerRecord* fsr = FindSortedRecord(output, node->name);
@ -110,7 +110,7 @@ void RecorderProfiler::RecurseBuildSortedRecords(ProfilerNode* node, b3Array<Pro
}
}
void RecorderProfiler::BuildSortedRecords(b3Array<ProfilerRecord*>& output)
void ProfilerRecorder::BuildSortedRecords(b3Array<ProfilerRecord*>& output)
{
assert(output.Count() == 0);

View File

@ -16,8 +16,8 @@
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef RECORDER_PROFILER_H
#define RECORDER_PROFILER_H
#ifndef PROFILER_RECORDER_H
#define PROFILER_RECORDER_H
#include <bounce/common/math/math.h>
#include <bounce/common/template/array.h>
@ -35,7 +35,7 @@ struct ProfilerRecord
};
// This class maintains persistent profiler records
class RecorderProfiler
class ProfilerRecorder
{
public:
void BuildRecords();
@ -53,6 +53,6 @@ private:
b3StackArray<ProfilerRecord, 256> m_records; // persistent profiler records
};
extern RecorderProfiler* g_recorderProfiler;
extern ProfilerRecorder* g_profilerRecorder;
#endif