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-12 01:07:15 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-12 01:07:15 +0000
commit97e9ccd6a43b365d11972c81aeb3faa0c3aa3503 (patch)
tree37185307ead88a0267b40c4379a64d7db1da5cb8 /cc/test/fake_output_surface.cc
parentb4c49028da217cbf78d1876e69cbf7af07aa385d (diff)
downloadchromium_src-97e9ccd6a43b365d11972c81aeb3faa0c3aa3503.zip
chromium_src-97e9ccd6a43b365d11972c81aeb3faa0c3aa3503.tar.gz
chromium_src-97e9ccd6a43b365d11972c81aeb3faa0c3aa3503.tar.bz2
cc: Handle retroactive BeginFrames in the Scheduler.
This will be the first step allowing us to pull logic out of the OutputSurface. Initially, the retroactive logic will exist in both the OutputSurface and the scheduler. Then, as all logic that depends on the retroactive logic has moved to the scheduler, I will remove the retroactive logic in OutputSurface. There are now 4 BeginFrames in the scheduler: 1) BeginFrame: from the OutputSurface. 2) BeginRetroFrame: a deferred BeginFrame. 3) BeginImplFrame: starts a compositor frame. 4) BeginMainFrame: starts a main frame. BUG=358409 Review URL: https://codereview.chromium.org/218633010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.cc')
-rw-r--r--cc/test/fake_output_surface.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index e72253c..920b689 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -19,7 +19,7 @@ FakeOutputSurface::FakeOutputSurface(
: OutputSurface(context_provider),
client_(NULL),
num_sent_frames_(0),
- needs_begin_impl_frame_(false),
+ needs_begin_frame_(false),
forced_draw_to_software_device_(false),
has_external_stencil_test_(false),
fake_weak_ptr_factory_(this) {
@@ -84,22 +84,23 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
}
}
-void FakeOutputSurface::SetNeedsBeginImplFrame(bool enable) {
- needs_begin_impl_frame_ = enable;
- OutputSurface::SetNeedsBeginImplFrame(enable);
+void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
+ needs_begin_frame_ = enable;
+ OutputSurface::SetNeedsBeginFrame(enable);
- // If there is not BeginImplFrame emulation from the FrameRateController,
- // then we just post a BeginImplFrame to emulate it as part of the test.
+ // 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_) {
base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&FakeOutputSurface::OnBeginImplFrame,
- fake_weak_ptr_factory_.GetWeakPtr()),
+ FROM_HERE,
+ base::Bind(&FakeOutputSurface::OnBeginFrame,
+ fake_weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(16));
}
}
-void FakeOutputSurface::OnBeginImplFrame() {
- OutputSurface::BeginImplFrame(BeginFrameArgs::CreateForTesting());
+void FakeOutputSurface::OnBeginFrame() {
+ OutputSurface::BeginFrame(BeginFrameArgs::CreateForTesting());
}