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

Unified Diff: cc/output/output_surface.h

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Fix android compile 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
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 8f782d77cf3241b814478526b2791172f4712f72..2f9fcd5e9e9585d31bc47b2f19fda5184cd4ba30 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -40,6 +40,10 @@ class Thread;
// 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);
@@ -53,11 +57,13 @@ 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) {}
bool delegated_rendering;
int max_frames_pending;
bool deferred_gl_initialization;
+ bool has_parent_compositor;
};
const Capabilities& capabilities() const {
@@ -141,7 +147,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, BeginFrameArgs args)
+ OVERRIDE;
scoped_ptr<FrameRateController> frame_rate_controller_;
int max_frames_pending_;
int pending_swap_buffers_;
@@ -151,7 +158,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(BeginFrameArgs args);
void DidSwapBuffers();
void OnSwapBuffersComplete(const CompositorFrameAck* ack);
void DidLoseOutputSurface();

Powered by Google App Engine
This is Rietveld 408576698