Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Unified Diff: cc/output/begin_frame_args.cc

Issue 2493853002: cc/blimp: Proto Cleanup. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/begin_frame_args.cc
diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
index e25d2f55c271123f8ee799a5c1d62aadf534bc2c..7ef2c4842ac4b30610a7acd9dd416f5f5270fc8a 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -6,7 +6,6 @@
#include "base/trace_event/trace_event_argument.h"
#include "cc/proto/base_conversions.h"
-#include "cc/proto/begin_main_frame_and_commit_state.pb.h"
namespace cc {
@@ -25,44 +24,6 @@ const char* BeginFrameArgs::TypeToString(BeginFrameArgsType type) {
return "???";
}
-void BeginFrameArgs::BeginFrameArgsTypeToProtobuf(
- proto::BeginFrameArgs* proto) const {
- switch (type) {
- case BeginFrameArgs::INVALID:
- proto->set_type(proto::BeginFrameArgs::INVALID);
- return;
- case BeginFrameArgs::NORMAL:
- proto->set_type(proto::BeginFrameArgs::NORMAL);
- return;
- case BeginFrameArgs::MISSED:
- proto->set_type(proto::BeginFrameArgs::MISSED);
- return;
- case BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX:
- proto->set_type(proto::BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX);
- return;
- }
- NOTREACHED();
-}
-
-void BeginFrameArgs::BeginFrameArgsTypeFromProtobuf(
- const proto::BeginFrameArgs& proto) {
- switch (proto.type()) {
- case proto::BeginFrameArgs::INVALID:
- type = BeginFrameArgs::INVALID;
- return;
- case proto::BeginFrameArgs::NORMAL:
- type = BeginFrameArgs::NORMAL;
- return;
- case proto::BeginFrameArgs::MISSED:
- type = BeginFrameArgs::MISSED;
- return;
- case proto::BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX:
- type = BeginFrameArgs::BEGIN_FRAME_ARGS_TYPE_MAX;
- return;
- }
- NOTREACHED();
-}
-
BeginFrameArgs::BeginFrameArgs()
: frame_time(base::TimeTicks()),
deadline(base::TimeTicks()),
@@ -118,22 +79,6 @@ void BeginFrameArgs::AsValueInto(base::trace_event::TracedValue* state) const {
state->SetBoolean("on_critical_path", on_critical_path);
}
-void BeginFrameArgs::ToProtobuf(proto::BeginFrameArgs* proto) const {
- proto->set_frame_time(TimeTicksToProto(frame_time));
- proto->set_deadline(TimeTicksToProto(deadline));
- proto->set_interval(interval.ToInternalValue());
- BeginFrameArgsTypeToProtobuf(proto);
- proto->set_on_critical_path(on_critical_path);
-}
-
-void BeginFrameArgs::FromProtobuf(const proto::BeginFrameArgs& proto) {
- frame_time = ProtoToTimeTicks(proto.frame_time());
- deadline = ProtoToTimeTicks(proto.deadline());
- interval = base::TimeDelta::FromInternalValue(proto.interval());
- BeginFrameArgsTypeFromProtobuf(proto);
- on_critical_path = proto.on_critical_path();
-}
-
// This is a hard-coded deadline adjustment that assumes 60Hz, to be used in
// cases where a good estimated draw time is not known. Using 1/3 of the vsync
// as the default adjustment gives the Browser the last 1/3 of a frame to
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698