Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/Profiler2GPU.cpp
Show All 31 Lines | |||||
#if !CONFIG2_GLES | #if !CONFIG2_GLES | ||||
class CProfiler2GPU_base | class CProfiler2GPU_base | ||||
{ | { | ||||
NONCOPYABLE(CProfiler2GPU_base); | NONCOPYABLE(CProfiler2GPU_base); | ||||
protected: | protected: | ||||
CProfiler2GPU_base(CProfiler2& profiler, const char* name) : | CProfiler2GPU_base(CProfiler2& profiler, const char* name) : | ||||
m_Profiler(profiler), m_Storage(profiler, name) | m_Profiler(profiler), m_Storage(*new CProfiler2::ThreadStorage(profiler, name)) | ||||
{ | { | ||||
m_Storage.RecordSyncMarker(m_Profiler.GetTime()); | m_Storage.RecordSyncMarker(m_Profiler.GetTime()); | ||||
m_Storage.Record(CProfiler2::ITEM_EVENT, m_Profiler.GetTime(), "thread start"); | m_Storage.Record(CProfiler2::ITEM_EVENT, m_Profiler.GetTime(), "thread start"); | ||||
m_Profiler.AddThreadStorage(&m_Storage); | m_Profiler.AddThreadStorage(&m_Storage); | ||||
} | } | ||||
~CProfiler2GPU_base() | ~CProfiler2GPU_base() | ||||
{ | { | ||||
m_Profiler.RemoveThreadStorage(&m_Storage); | m_Profiler.RemoveThreadStorage(&m_Storage); | ||||
} | } | ||||
CProfiler2& m_Profiler; | CProfiler2& m_Profiler; | ||||
CProfiler2::ThreadStorage m_Storage; | CProfiler2::ThreadStorage& m_Storage; | ||||
}; | }; | ||||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | ||||
// Base class for ARB_timer_query, EXT_timer_query | // Base class for ARB_timer_query, EXT_timer_query | ||||
class CProfiler2GPU_timer_query : public CProfiler2GPU_base | class CProfiler2GPU_timer_query : public CProfiler2GPU_base | ||||
{ | { | ||||
protected: | protected: | ||||
▲ Show 20 Lines • Show All 812 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator