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

Unified Diff: cc/output/output_surface.h

Issue 17391006: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/begin_frame_args.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 0ef25aed596ff8cb00b4f442f21e5cec4ba631e0..ba6062197afeefe33e0acb5f933c3dc385e18007 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -41,6 +41,10 @@ class OutputSurfaceCallbacks;
// surface (on the compositor thread) and go back to step 1.
class CC_EXPORT OutputSurface : public FrameRateControllerClient {
public:
+ enum {
+ DEFAULT_MAX_FRAMES_PENDING = 2
+ };
+
explicit OutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
explicit OutputSurface(scoped_ptr<cc::SoftwareOutputDevice> software_device);
@@ -54,11 +58,14 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
Capabilities()
: delegated_rendering(false),
max_frames_pending(0),
- deferred_gl_initialization(false) {}
-
+ deferred_gl_initialization(false),
+ has_parent_compositor(true) {}
piman 2013/06/18 19:43:31 nit: as discussed, maybe rename as 'adjust_deadlin
bool delegated_rendering;
int max_frames_pending;
bool deferred_gl_initialization;
+ // This doesn't handle the <webview> case, but once BeginFrame is
+ // supported natively, we shouldn't need has_parent_compositor.
+ bool has_parent_compositor;
};
const Capabilities& capabilities() const {
@@ -142,7 +149,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
// Platforms should move to native BeginFrames instead.
void OnVSyncParametersChanged(base::TimeTicks timebase,
base::TimeDelta interval);
- virtual void FrameRateControllerTick(bool throttled) OVERRIDE;
+ virtual void FrameRateControllerTick(bool throttled,
+ const BeginFrameArgs& args) OVERRIDE;
scoped_ptr<FrameRateController> frame_rate_controller_;
int max_frames_pending_;
int pending_swap_buffers_;
@@ -152,7 +160,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
// first so OutputSurface has a chance to update the FrameRateController
bool HasClient() { return !!client_; }
void SetNeedsRedrawRect(gfx::Rect damage_rect);
- void BeginFrame(base::TimeTicks frame_time);
+ void BeginFrame(const BeginFrameArgs& args);
void DidSwapBuffers();
void OnSwapBuffersComplete(const CompositorFrameAck* ack);
void DidLoseOutputSurface();
« no previous file with comments | « cc/output/begin_frame_args.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698