mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Cleanup.
This commit is contained in:
parent
44efb15df1
commit
53632ccb5b
@ -7,7 +7,6 @@ namespace tracy
|
|||||||
|
|
||||||
TimelineController::TimelineController( View& view, Worker& worker )
|
TimelineController::TimelineController( View& view, Worker& worker )
|
||||||
: m_height( 0 )
|
: m_height( 0 )
|
||||||
, m_offset( 0 )
|
|
||||||
, m_scroll( 0 )
|
, m_scroll( 0 )
|
||||||
, m_firstFrame( true )
|
, m_firstFrame( true )
|
||||||
, m_view( view )
|
, m_view( view )
|
||||||
|
@ -43,7 +43,6 @@ private:
|
|||||||
unordered_flat_map<const void*, std::unique_ptr<TimelineItem>> m_itemMap;
|
unordered_flat_map<const void*, std::unique_ptr<TimelineItem>> m_itemMap;
|
||||||
|
|
||||||
float m_height;
|
float m_height;
|
||||||
float m_offset;
|
|
||||||
float m_scroll;
|
float m_scroll;
|
||||||
|
|
||||||
bool m_firstFrame;
|
bool m_firstFrame;
|
||||||
|
@ -19,12 +19,9 @@ bool View::DrawCpuData( double pxns, int& offset, const ImVec2& wpos, bool hover
|
|||||||
|
|
||||||
const auto w = ImGui::GetContentRegionAvail().x - 1;
|
const auto w = ImGui::GetContentRegionAvail().x - 1;
|
||||||
const auto ty = ImGui::GetTextLineHeight();
|
const auto ty = ImGui::GetTextLineHeight();
|
||||||
const auto ostep = ty + 1;
|
|
||||||
const auto nspxdbl = 1.0 / pxns;
|
const auto nspxdbl = 1.0 / pxns;
|
||||||
const auto nspx = int64_t( nspxdbl );
|
const auto nspx = int64_t( nspxdbl );
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
const auto to = 9.f;
|
|
||||||
const auto th = ( ty - to ) * sqrt( 3 ) * 0.5;
|
|
||||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||||
|
|
||||||
#ifdef TRACY_NO_STATISTICS
|
#ifdef TRACY_NO_STATISTICS
|
||||||
|
@ -109,7 +109,7 @@ void View::DrawOptions()
|
|||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
auto& item = (TimelineItemGpu&)( m_tc.GetItem( gpuData[i] ) );
|
auto& item = (TimelineItemGpu&)( m_tc.GetItem( gpuData[i] ) );
|
||||||
sprintf( buf, "%s context %zu", GpuContextNames[(int)gpuData[i]->type], item.GetIdx() );
|
sprintf( buf, "%s context %i", GpuContextNames[(int)gpuData[i]->type], item.GetIdx() );
|
||||||
ImGui::PushFont( m_smallFont );
|
ImGui::PushFont( m_smallFont );
|
||||||
ImGui::TextUnformatted( buf );
|
ImGui::TextUnformatted( buf );
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
constexpr float MinVisSize = 3;
|
|
||||||
|
|
||||||
extern double s_time;
|
extern double s_time;
|
||||||
|
|
||||||
void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w, double& pxns )
|
void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w, double& pxns )
|
||||||
@ -328,15 +326,7 @@ void View::DrawTimeline()
|
|||||||
bool hover = ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( w, h ) );
|
bool hover = ImGui::IsWindowHovered() && ImGui::IsMouseHoveringRect( wpos, wpos + ImVec2( w, h ) );
|
||||||
draw = ImGui::GetWindowDrawList();
|
draw = ImGui::GetWindowDrawList();
|
||||||
|
|
||||||
const auto nspx = 1.0 / pxns;
|
|
||||||
|
|
||||||
ImGui::PushFont( m_smallFont );
|
|
||||||
const auto sty = ImGui::GetTextLineHeight();
|
|
||||||
const auto sstep = sty + 1;
|
|
||||||
ImGui::PopFont();
|
|
||||||
|
|
||||||
const auto ty = ImGui::GetTextLineHeight();
|
const auto ty = ImGui::GetTextLineHeight();
|
||||||
const auto ostep = ty + 1;
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
const auto to = 9.f;
|
const auto to = 9.f;
|
||||||
const auto th = ( ty - to ) * sqrt( 3 ) * 0.5;
|
const auto th = ( ty - to ) * sqrt( 3 ) * 0.5;
|
||||||
|
Loading…
Reference in New Issue
Block a user