mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Simplify context switch precalculation.
This commit is contained in:
@@ -30,40 +30,25 @@ struct TimelineDraw
|
||||
enum class ContextSwitchDrawType : uint8_t
|
||||
{
|
||||
Waiting,
|
||||
FoldedOne,
|
||||
FoldedMulti,
|
||||
Folded,
|
||||
Running
|
||||
};
|
||||
|
||||
struct ContextSwitchDrawFolded
|
||||
{
|
||||
Int48 rend;
|
||||
int num;
|
||||
};
|
||||
|
||||
struct ContextSwitchDrawWaiting
|
||||
{
|
||||
short_ptr<ContextSwitchData> prev;
|
||||
uint32_t waitStack;
|
||||
};
|
||||
|
||||
struct ContextSwitchDraw
|
||||
{
|
||||
ContextSwitchDrawType type;
|
||||
short_ptr<ContextSwitchData> ev;
|
||||
union
|
||||
{
|
||||
ContextSwitchDrawFolded folded;
|
||||
ContextSwitchDrawWaiting waiting;
|
||||
};
|
||||
uint32_t idx;
|
||||
uint32_t data; // Folded: number of items -OR- Waiting: wait stack
|
||||
};
|
||||
|
||||
|
||||
struct SamplesDraw
|
||||
{
|
||||
uint32_t num;
|
||||
uint32_t idx;
|
||||
};
|
||||
|
||||
|
||||
struct MessagesDraw
|
||||
{
|
||||
short_ptr<MessageData> msg;
|
||||
|
||||
Reference in New Issue
Block a user