Expose a playback percentage rather than pointers in TracePlayer
This commit is contained in:
@@ -39,9 +39,8 @@ class TracePlayer : public TraceReader {
|
||||
const Frame* current_frame() const;
|
||||
|
||||
// Only valid if playing_trace is true.
|
||||
const uint8_t* player_current_ptr() const { return player_current_ptr_; }
|
||||
const uint8_t* player_start_ptr() const { return player_start_ptr_; }
|
||||
const uint8_t* player_target_ptr() const { return player_target_ptr_; }
|
||||
// Scalar from 0-10000
|
||||
uint32_t playback_percent() const { return playback_percent_; }
|
||||
|
||||
void SeekFrame(int target_frame);
|
||||
void SeekCommand(int target_command);
|
||||
@@ -56,10 +55,8 @@ class TracePlayer : public TraceReader {
|
||||
GraphicsSystem* graphics_system_;
|
||||
int current_frame_index_;
|
||||
int current_command_index_;
|
||||
std::atomic<bool> playing_trace_ = false;
|
||||
std::atomic<const uint8_t*> player_current_ptr_ = 0;
|
||||
std::atomic<const uint8_t*> player_start_ptr_ = 0;
|
||||
std::atomic<const uint8_t*> player_target_ptr_ = 0;
|
||||
bool playing_trace_ = false;
|
||||
std::atomic<uint32_t> playback_percent_ = 0;
|
||||
};
|
||||
|
||||
} // namespace gpu
|
||||
|
||||
Reference in New Issue
Block a user