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

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: 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 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } else { 1279 } else {
1280 AddOnCommitCallbackAndDisableLocks( 1280 AddOnCommitCallbackAndDisableLocks(
1281 base::Bind(ack_callback, false, texture_to_return)); 1281 base::Bind(ack_callback, false, texture_to_return));
1282 } 1282 }
1283 1283
1284 DidReceiveFrameFromRenderer(); 1284 DidReceiveFrameFromRenderer();
1285 } 1285 }
1286 1286
1287 void RenderWidgetHostViewAura::DidReceiveFrameFromRenderer() { 1287 void RenderWidgetHostViewAura::DidReceiveFrameFromRenderer() {
1288 if (frame_subscriber() && CanCopyToVideoFrame()) { 1288 if (frame_subscriber() && CanCopyToVideoFrame()) {
1289 const base::Time present_time = base::Time::Now(); 1289 const base::TimeTicks present_time = base::TimeTicks::Now();
1290 scoped_refptr<media::VideoFrame> frame; 1290 scoped_refptr<media::VideoFrame> frame;
1291 RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback; 1291 RenderWidgetHostViewFrameSubscriber::DeliverFrameCallback callback;
1292 if (frame_subscriber()->ShouldCaptureFrame(present_time, 1292 if (frame_subscriber()->ShouldCaptureFrame(present_time,
1293 &frame, &callback)) { 1293 &frame, &callback)) {
1294 CopyFromCompositingSurfaceToVideoFrame( 1294 CopyFromCompositingSurfaceToVideoFrame(
1295 gfx::Rect(current_frame_size_), 1295 gfx::Rect(current_frame_size_),
1296 frame, 1296 frame,
1297 base::Bind(callback, present_time)); 1297 base::Bind(callback, present_time));
1298 } 1298 }
1299 } 1299 }
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 RenderWidgetHost* widget) { 3475 RenderWidgetHost* widget) {
3476 return new RenderWidgetHostViewAura(widget); 3476 return new RenderWidgetHostViewAura(widget);
3477 } 3477 }
3478 3478
3479 // static 3479 // static
3480 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3480 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3481 GetScreenInfoForWindow(results, NULL); 3481 GetScreenInfoForWindow(results, NULL);
3482 } 3482 }
3483 3483
3484 } // namespace content 3484 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698