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

Add frame target UI.

This commit is contained in:
Bartosz Taudul
2020-11-15 15:46:23 +01:00
parent b0e69b2e9f
commit 8a1d8e4bac
3 changed files with 20 additions and 1 deletions
+5 -1
View File
@@ -21,7 +21,7 @@ constexpr auto FileAnnotations = "annotations";
constexpr auto FileSourceSubstitutions = "srcsub";
enum : uint32_t { VersionTimeline = 0 };
enum : uint32_t { VersionOptions = 6 };
enum : uint32_t { VersionOptions = 7 };
enum : uint32_t { VersionAnnotations = 0 };
enum : uint32_t { VersionSourceSubstitutions = 0 };
@@ -102,6 +102,7 @@ void UserData::LoadState( ViewData& data )
fread( &data.drawPlots, 1, sizeof( data.drawPlots ), f );
fread( &data.onlyContendedLocks, 1, sizeof( data.onlyContendedLocks ), f );
fread( &data.drawEmptyLabels, 1, sizeof( data.drawEmptyLabels ), f );
fread( &data.drawFrameTargets, 1, sizeof( data.drawFrameTargets ), f );
fread( &data.drawContextSwitches, 1, sizeof( data.drawContextSwitches ), f );
fread( &data.darkenContextSwitches, 1, sizeof( data.darkenContextSwitches ), f );
fread( &data.drawCpuData, 1, sizeof( data.drawCpuData ), f );
@@ -110,6 +111,7 @@ void UserData::LoadState( ViewData& data )
fread( &data.dynamicColors, 1, sizeof( data.dynamicColors ), f );
fread( &data.forceColors, 1, sizeof( data.forceColors ), f );
fread( &data.ghostZones, 1, sizeof( data.ghostZones ), f );
fread( &data.frameTarget, 1, sizeof( data.frameTarget ), f );
}
fclose( f );
}
@@ -144,6 +146,7 @@ void UserData::SaveState( const ViewData& data )
fwrite( &data.drawPlots, 1, sizeof( data.drawPlots ), f );
fwrite( &data.onlyContendedLocks, 1, sizeof( data.onlyContendedLocks ), f );
fwrite( &data.drawEmptyLabels, 1, sizeof( data.drawEmptyLabels ), f );
fwrite( &data.drawFrameTargets, 1, sizeof( data.drawFrameTargets ), f );
fwrite( &data.drawContextSwitches, 1, sizeof( data.drawContextSwitches ), f );
fwrite( &data.darkenContextSwitches, 1, sizeof( data.darkenContextSwitches ), f );
fwrite( &data.drawCpuData, 1, sizeof( data.drawCpuData ), f );
@@ -152,6 +155,7 @@ void UserData::SaveState( const ViewData& data )
fwrite( &data.dynamicColors, 1, sizeof( data.dynamicColors ), f );
fwrite( &data.forceColors, 1, sizeof( data.forceColors ), f );
fwrite( &data.ghostZones, 1, sizeof( data.ghostZones ), f );
fwrite( &data.frameTarget, 1, sizeof( data.frameTarget ), f );
fclose( f );
}
}