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

Unified Diff: content/browser/renderer_host/render_widget_host_view_browsertest.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_browsertest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 3f1d760d33b875cc73325453a4ceb70b36028cec..22bc6f216f7d8ae5e274b5a5b9f9ea77aa2c99f6 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -147,7 +147,7 @@ class RenderWidgetHostViewBrowserTest : public ContentBrowserTest {
// Callback when using frame subscriber API.
void FrameDelivered(const scoped_refptr<base::MessageLoopProxy>& loop,
base::Closure quit_closure,
- base::Time timestamp,
+ base::TimeTicks timestamp,
bool frame_captured) {
++callback_invoke_count_;
if (frame_captured)
@@ -338,10 +338,9 @@ class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber {
: callback_(callback) {
}
- virtual bool ShouldCaptureFrame(
- base::Time present_time,
- scoped_refptr<media::VideoFrame>* storage,
- DeliverFrameCallback* callback) OVERRIDE {
+ virtual bool ShouldCaptureFrame(base::TimeTicks present_time,
+ scoped_refptr<media::VideoFrame>* storage,
+ DeliverFrameCallback* callback) OVERRIDE {
// Only allow one frame capture to be made. Otherwise, the compositor could
// start multiple captures, unbounded, and eventually its own limiter logic
// will begin invoking |callback| with a |false| result. This flakes out
@@ -494,14 +493,15 @@ IN_PROC_BROWSER_TEST_P(CompositingRenderWidgetHostViewBrowserTest, CopyTwice) {
base::Unretained(this),
base::MessageLoopProxy::current(),
base::Closure(),
- base::Time::Now()));
+ base::TimeTicks::Now()));
view->CopyFromCompositingSurfaceToVideoFrame(
- gfx::Rect(view->GetViewBounds().size()), second_output,
+ gfx::Rect(view->GetViewBounds().size()),
+ second_output,
base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
base::Unretained(this),
base::MessageLoopProxy::current(),
run_loop.QuitClosure(),
- base::Time::Now()));
+ base::TimeTicks::Now()));
run_loop.Run();
EXPECT_EQ(2, callback_invoke_count());

Powered by Google App Engine
This is Rietveld 408576698