#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include <utility>
#include "base/trace_event/interned_args_helper.h"
#include "base/trace_event/traced_value.h"
#include "base/tracing/protos/chrome_track_event.pbzero.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/source_location.pbzero.h"
namespace viz {
const char* BeginFrameArgs::TypeToString(BeginFrameArgsType type) { … }
namespace {
perfetto::protos::pbzero::BeginFrameArgsV2::BeginFrameArgsType
TypeToProtozeroEnum(BeginFrameArgs::BeginFrameArgsType type) { … }
}
constexpr uint64_t BeginFrameArgs::kInvalidFrameNumber;
constexpr uint64_t BeginFrameArgs::kStartingFrameNumber;
BeginFrameId::BeginFrameId()
: … { … }
BeginFrameId::BeginFrameId(const BeginFrameId& id) = default;
BeginFrameId& BeginFrameId::operator=(const BeginFrameId& id) = default;
BeginFrameId::BeginFrameId(uint64_t source_id, uint64_t sequence_number)
: … { … }
bool BeginFrameId::IsNextInSequenceTo(const BeginFrameId& previous) const { … }
bool BeginFrameId::IsSequenceValid() const { … }
std::string BeginFrameId::ToString() const { … }
PossibleDeadline::PossibleDeadline(int64_t vsync_id,
base::TimeDelta latch_delta,
base::TimeDelta present_delta)
: … { … }
PossibleDeadline::PossibleDeadline(const PossibleDeadline& other) = default;
PossibleDeadline::PossibleDeadline(PossibleDeadline&& other) = default;
PossibleDeadline::~PossibleDeadline() = default;
PossibleDeadline& PossibleDeadline::operator=(const PossibleDeadline& other) =
default;
PossibleDeadline& PossibleDeadline::operator=(PossibleDeadline&& other) =
default;
PossibleDeadlines::PossibleDeadlines(size_t preferred_index)
: … { … }
PossibleDeadlines::PossibleDeadlines(const PossibleDeadlines& other) = default;
PossibleDeadlines::PossibleDeadlines(PossibleDeadlines&& other) = default;
PossibleDeadlines::~PossibleDeadlines() = default;
PossibleDeadlines& PossibleDeadlines::operator=(
const PossibleDeadlines& other) = default;
PossibleDeadlines& PossibleDeadlines::operator=(PossibleDeadlines&& other) =
default;
const PossibleDeadline& PossibleDeadlines::GetPreferredDeadline() const { … }
BeginFrameArgs::BeginFrameArgs()
: … { … }
BeginFrameArgs::~BeginFrameArgs() = default;
BeginFrameArgs::BeginFrameArgs(uint64_t source_id,
uint64_t sequence_number,
base::TimeTicks frame_time,
base::TimeTicks deadline,
base::TimeDelta interval,
BeginFrameArgs::BeginFrameArgsType type)
: … { … }
BeginFrameArgs::BeginFrameArgs(const BeginFrameArgs& args) = default;
BeginFrameArgs& BeginFrameArgs::operator=(const BeginFrameArgs& args) = default;
BeginFrameArgs BeginFrameArgs::Create(BeginFrameArgs::CreationLocation location,
uint64_t source_id,
uint64_t sequence_number,
base::TimeTicks frame_time,
base::TimeTicks deadline,
base::TimeDelta interval,
BeginFrameArgs::BeginFrameArgsType type) { … }
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
BeginFrameArgs::AsValue() const { … }
void BeginFrameArgs::AsValueInto(base::trace_event::TracedValue* state) const { … }
void BeginFrameArgs::AsProtozeroInto(
perfetto::EventContext& ctx,
perfetto::protos::pbzero::BeginFrameArgsV2* state) const { … }
std::string BeginFrameArgs::ToString() const { … }
BeginFrameAck::BeginFrameAck(const BeginFrameArgs& args, bool has_damage)
: … { … }
BeginFrameAck::BeginFrameAck(uint64_t source_id,
uint64_t sequence_number,
bool has_damage,
int64_t trace_id)
: … { … }
BeginFrameAck BeginFrameAck::CreateManualAckWithDamage() { … }
}