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

Side by Side Diff: cc/test/fake_output_surface.cc

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Rebase Created 7 years, 6 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 | « cc/test/fake_output_surface.h ('k') | cc/test/scheduler_test_common.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // then we just post a BeginFrame to emulate it as part of the test. 76 // then we just post a BeginFrame to emulate it as part of the test.
77 if (enable && !frame_rate_controller_) { 77 if (enable && !frame_rate_controller_) {
78 base::MessageLoop::current()->PostDelayedTask( 78 base::MessageLoop::current()->PostDelayedTask(
79 FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginFrame, 79 FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginFrame,
80 fake_weak_ptr_factory_.GetWeakPtr()), 80 fake_weak_ptr_factory_.GetWeakPtr()),
81 base::TimeDelta::FromMilliseconds(16)); 81 base::TimeDelta::FromMilliseconds(16));
82 } 82 }
83 } 83 }
84 84
85 void FakeOutputSurface::OnBeginFrame() { 85 void FakeOutputSurface::OnBeginFrame() {
86 OutputSurface::BeginFrame(base::TimeTicks::Now()); 86 OutputSurface::BeginFrame(BeginFrameArgs::CreateForTesting());
87 } 87 }
88 88
89 89
90 bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const { 90 bool FakeOutputSurface::ForcedDrawToSoftwareDevice() const {
91 return forced_draw_to_software_device_; 91 return forced_draw_to_software_device_;
92 } 92 }
93 93
94 } // namespace cc 94 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698