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

Pass yMin, yMax through TimelineContext.

This commit is contained in:
Bartosz Taudul
2023-03-15 23:56:57 +01:00
parent c81ef177ab
commit 9538fa99ca
11 changed files with 21 additions and 18 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ TimelineItem::TimelineItem( View& view, Worker& worker, const void* key, bool wa
{
}
void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffset, bool hover, float yMin, float yMax )
void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffset, bool hover )
{
const auto yBegin = yOffset;
auto yEnd = yOffset;
@@ -45,7 +45,7 @@ void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffse
yEnd += ostep;
if( m_showFull )
{
if( !DrawContents( ctx, yEnd, hover, yMin, yMax ) && !m_view.GetViewData().drawEmptyLabels )
if( !DrawContents( ctx, yEnd, hover ) && !m_view.GetViewData().drawEmptyLabels )
{
yEnd = yBegin;
AdjustThreadHeight( firstFrame, yBegin, yEnd );
@@ -60,7 +60,7 @@ void TimelineItem::Draw( bool firstFrame, const TimelineContext& ctx, int yOffse
float labelWidth;
const auto hdrOffset = yBegin;
const bool drawHeader = yPos + ty >= yMin && yPos <= yMax;
const bool drawHeader = yPos + ty >= ctx.yMin && yPos <= ctx.yMax;
if( drawHeader )
{
const auto color = HeaderColor();