summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.cc
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 10:06:05 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 10:06:05 +0000
commit3dc0c77486b217a40c817e4942a11dfd48651533 (patch)
tree6c12d3d3f59cb6bf8e5ec841307b32c1c826d444 /cc/test/fake_output_surface.cc
parentb5556b29fb292017f98224b4dc8894bd16bc7272 (diff)
downloadchromium_src-3dc0c77486b217a40c817e4942a11dfd48651533.zip
chromium_src-3dc0c77486b217a40c817e4942a11dfd48651533.tar.gz
chromium_src-3dc0c77486b217a40c817e4942a11dfd48651533.tar.bz2
cc: Move scheduling logic out of OutputSurface
This moves the vsync throttling enabled/disabled logic and the synthetic/emulated BeginFrame logic out of OutputSurface and moves it to the Scheduler. This then allows us to also remove the retroactive BeginFrame logic from OutputSurface since the Scheduler also has retroactive BeginFrame logic. BUG=246861 BUG=251909 Review URL: https://codereview.chromium.org/221833009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.cc')
-rw-r--r--cc/test/fake_output_surface.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 920b689..352b6e4 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -76,7 +76,7 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
++num_sent_frames_;
PostSwapBuffersComplete();
- DidSwapBuffers();
+ client_->DidSwapBuffers();
} else {
OutputSurface::SwapBuffers(frame);
frame->AssignTo(&last_sent_frame_);
@@ -88,9 +88,7 @@ void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
needs_begin_frame_ = enable;
OutputSurface::SetNeedsBeginFrame(enable);
- // If there is not BeginFrame emulation from the FrameRateController,
- // then we just post a BeginFrame to emulate it as part of the test.
- if (enable && !frame_rate_controller_) {
+ if (enable) {
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&FakeOutputSurface::OnBeginFrame,
@@ -100,7 +98,7 @@ void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
}
void FakeOutputSurface::OnBeginFrame() {
- OutputSurface::BeginFrame(BeginFrameArgs::CreateForTesting());
+ client_->BeginFrame(BeginFrameArgs::CreateForTesting());
}