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

Side by Side Diff: remoting/client/plugin/pepper_video_renderer_3d.cc

Issue 836183002: Rename sequence_number to timestamp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/client/software_video_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "remoting/client/plugin/pepper_video_renderer_3d.h" 5 #include "remoting/client/plugin/pepper_video_renderer_3d.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (!packet->data().size()) 186 if (!packet->data().size())
187 return; 187 return;
188 188
189 // Update statistics. 189 // Update statistics.
190 stats_.video_frame_rate()->Record(1); 190 stats_.video_frame_rate()->Record(1);
191 stats_.video_bandwidth()->Record(packet->data().size()); 191 stats_.video_bandwidth()->Record(packet->data().size());
192 if (packet->has_capture_time_ms()) 192 if (packet->has_capture_time_ms())
193 stats_.video_capture_ms()->Record(packet->capture_time_ms()); 193 stats_.video_capture_ms()->Record(packet->capture_time_ms());
194 if (packet->has_encode_time_ms()) 194 if (packet->has_encode_time_ms())
195 stats_.video_encode_ms()->Record(packet->encode_time_ms()); 195 stats_.video_encode_ms()->Record(packet->encode_time_ms());
196 if (packet->has_client_sequence_number() && 196 if (packet->has_latest_event_timestamp() &&
197 packet->client_sequence_number() > latest_input_event_timestamp_) { 197 packet->latest_event_timestamp() > latest_input_event_timestamp_) {
198 latest_input_event_timestamp_ = packet->client_sequence_number(); 198 latest_input_event_timestamp_ = packet->latest_event_timestamp();
199 base::TimeDelta round_trip_latency = 199 base::TimeDelta round_trip_latency =
200 base::Time::Now() - 200 base::Time::Now() -
201 base::Time::FromInternalValue(packet->client_sequence_number()); 201 base::Time::FromInternalValue(packet->latest_event_timestamp());
202 stats_.round_trip_ms()->Record(round_trip_latency.InMilliseconds()); 202 stats_.round_trip_ms()->Record(round_trip_latency.InMilliseconds());
203 } 203 }
204 204
205 bool resolution_changed = false; 205 bool resolution_changed = false;
206 206
207 if (packet->format().has_screen_width() && 207 if (packet->format().has_screen_width() &&
208 packet->format().has_screen_height()) { 208 packet->format().has_screen_height()) {
209 webrtc::DesktopSize frame_size(packet->format().screen_width(), 209 webrtc::DesktopSize frame_size(packet->format().screen_width(),
210 packet->format().screen_height()); 210 packet->format().screen_height());
211 if (!frame_size_.equals(frame_size)) { 211 if (!frame_size_.equals(frame_size)) {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); 508 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader);
509 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); 509 gles2_if_->DeleteShader(graphics_.pp_resource(), shader);
510 } 510 }
511 511
512 void PepperVideoRenderer3D::CheckGLError() { 512 void PepperVideoRenderer3D::CheckGLError() {
513 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); 513 GLenum error = gles2_if_->GetError(graphics_.pp_resource());
514 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; 514 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error;
515 } 515 }
516 516
517 } // namespace remoting 517 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/software_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698