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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 101843005: Convert video capture pipline to base::TimeTicks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 9890509b Rebase, Windows compile fixes Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 } else { 1280 } else {
1281 AddOnCommitCallbackAndDisableLocks( 1281 AddOnCommitCallbackAndDisableLocks(
1282 base::Bind(ack_callback, false, texture_to_return)); 1282 base::Bind(ack_callback, false, texture_to_return));
1283 } 1283 }
1284 1284
1285 DidReceiveFrameFromRenderer(); 1285 DidReceiveFrameFromRenderer();
1286 } 1286 }
1287 1287
1288 void RenderWidgetHostViewAura::DidReceiveFrameFromRenderer() { 1288 void RenderWidgetHostViewAura::DidReceiveFrameFromRenderer() {
1289 if (frame_subscriber() && CanCopyToVideoFrame()) { 1289 if (frame_subscriber() && CanCopyToVideoFrame()) {
1290 const base::Time present_time = base::Time::Now(); 1290 const base::TimeTicks present_time = base::TimeTicks::Now();
1291 scoped_refptr<media::VideoFrame> frame; 1291 scoped_refptr<media::VideoFrame> frame;
1292 RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback; 1292 RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback;
1293 if (frame_subscriber()->ShouldCaptureFrame(present_time, 1293 if (frame_subscriber()->ShouldCaptureFrame(present_time,
1294 &frame, &callback)) { 1294 &frame, &callback)) {
1295 CopyFromCompositingSurfaceToVideoFrame( 1295 CopyFromCompositingSurfaceToVideoFrame(
1296 gfx::Rect(current_frame_size_), 1296 gfx::Rect(current_frame_size_),
1297 frame, 1297 frame,
1298 base::Bind(callback, present_time)); 1298 base::Bind(callback, present_time));
1299 } 1299 }
1300 } 1300 }
(...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3491 RenderWidgetHost* widget) { 3491 RenderWidgetHost* widget) {
3492 return new RenderWidgetHostViewAura(widget); 3492 return new RenderWidgetHostViewAura(widget);
3493 } 3493 }
3494 3494
3495 // static 3495 // static
3496 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3496 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3497 GetScreenInfoForWindow(results, NULL); 3497 GetScreenInfoForWindow(results, NULL);
3498 } 3498 }
3499 3499
3500 } // namespace content 3500 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698