1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Activity tracking global variable.

This commit is contained in:
Bartosz Taudul
2022-09-28 00:31:42 +02:00
parent c7ec2a9e0e
commit fb4d76469b
3 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ static void DrawContents()
bptr->NewFrame( display_w, display_h );
static int activeFrames = 3;
if( view && view->WasActive() )
if( tracy::WasActive() || ( view && view->WasActive() ) )
{
activeFrames = 3;
}
+13
View File
@@ -13,6 +13,19 @@
namespace tracy
{
bool s_wasActive = false;
bool WasActive()
{
if( s_wasActive )
{
s_wasActive = false;
return true;
}
return false;
}
void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness )
{
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
+4
View File
@@ -22,6 +22,10 @@ static inline ImVec2 operator-( const ImVec2& l, const ImVec2& r ) { return ImVe
namespace tracy
{
extern bool s_wasActive;
bool WasActive();
void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness = 1.f );
void DrawStripedRect( ImDrawList* draw, const ImVec2& wpos, double x0, double y0, double x1, double y1, double sw, uint32_t color, bool fix_stripes_in_screen_space, bool inverted );
void DrawHistogramMinMaxLabel( ImDrawList* draw, int64_t tmin, int64_t tmax, ImVec2 wpos, float w, float ty );