| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/test/begin_frame_args_test.h" | 5 #include "cc/test/begin_frame_args_test.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/output/begin_frame_args.h" | 10 #include "cc/output/begin_frame_args.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) { | 88 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) { |
| 89 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", " | 89 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", " |
| 90 << args.source_id << ", " << args.sequence_number << ", " | 90 << args.source_id << ", " << args.sequence_number << ", " |
| 91 << args.frame_time.ToInternalValue() << ", " | 91 << args.frame_time.ToInternalValue() << ", " |
| 92 << args.deadline.ToInternalValue() << ", " | 92 << args.deadline.ToInternalValue() << ", " |
| 93 << args.interval.InMicroseconds() << "us)"; | 93 << args.interval.InMicroseconds() << "us)"; |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool operator==(const BeginFrameAck& lhs, const BeginFrameAck& rhs) { |
| 97 return (lhs.source_id == rhs.source_id) && |
| 98 (lhs.sequence_number == rhs.sequence_number) && |
| 99 (lhs.latest_confirmed_sequence_number == |
| 100 rhs.latest_confirmed_sequence_number) && |
| 101 (lhs.remaining_frames == rhs.remaining_frames) && |
| 102 (lhs.has_damage == rhs.has_damage); |
| 103 } |
| 104 |
| 105 ::std::ostream& operator<<(::std::ostream& os, const BeginFrameAck& args) { |
| 106 PrintTo(args, &os); |
| 107 return os; |
| 108 } |
| 109 |
| 110 void PrintTo(const BeginFrameAck& ack, ::std::ostream* os) { |
| 111 *os << "BeginFrameAck(" << ack.source_id << ", " << ack.sequence_number |
| 112 << ", " << ack.latest_confirmed_sequence_number << ", " |
| 113 << ack.remaining_frames << ", " << ack.has_damage << ")"; |
| 114 } |
| 115 |
| 96 } // namespace cc | 116 } // namespace cc |
| OLD | NEW |