summaryrefslogtreecommitdiffstats
path: root/cc/output/output_surface.h
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:25:29 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:25:29 +0000
commit7e7bfb887402975231447ccbdb8a636aeba644d9 (patch)
tree935cc112922cdd1eab0ec68d21a0fefe72028190 /cc/output/output_surface.h
parent11b9a3b34801022a851e230088ecb4a9070982c7 (diff)
downloadchromium_src-7e7bfb887402975231447ccbdb8a636aeba644d9.zip
chromium_src-7e7bfb887402975231447ccbdb8a636aeba644d9.tar.gz
chromium_src-7e7bfb887402975231447ccbdb8a636aeba644d9.tar.bz2
cc: Trigger BeginFrames that were just missed retroactively
If a SwapAck, SetNeedsBeginFrame, or a Swap occurs *just* after a BeginFrame is received and skipped by the compositor, this patch tries the BeginFrame retroactively if it's possible we might still be able to produce a frame in time. Also fixes the include guards of begin_frame_args.h. BUG=243384,243500 Review URL: https://chromiumcodereview.appspot.com/17315011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/output_surface.h')
-rw-r--r--cc/output/output_surface.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 3172f41..738e650 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -154,6 +154,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
scoped_ptr<FrameRateController> frame_rate_controller_;
int max_frames_pending_;
int pending_swap_buffers_;
+ bool needs_begin_frame_;
bool begin_frame_pending_;
// Forwarded to OutputSurfaceClient but threaded through OutputSurface
@@ -167,12 +168,19 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
void SetExternalDrawConstraints(const gfx::Transform& transform,
gfx::Rect viewport);
+ // virtual for testing.
+ virtual base::TimeDelta RetroactiveBeginFramePeriod();
+ virtual void PostCheckForRetroactiveBeginFrame();
+ void CheckForRetroactiveBeginFrame();
+
private:
OutputSurfaceClient* client_;
friend class OutputSurfaceCallbacks;
void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
+ BeginFrameArgs skipped_begin_frame_args_;
+
DISALLOW_COPY_AND_ASSIGN(OutputSurface);
};