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

Unified Diff: content/browser/compositor/onscreen_display_client.h

Issue 578383004: Limit outstanding surface draw swaps to max_frames_pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/surfaces/display_client.h ('k') | content/browser/compositor/onscreen_display_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/onscreen_display_client.h
diff --git a/content/browser/compositor/onscreen_display_client.h b/content/browser/compositor/onscreen_display_client.h
index 7dc073cf9e951b58e5e64e021fbacaabaa6fe68d..12fac97b458d25c1c24d15d4d9cae87359b7682a 100644
--- a/content/browser/compositor/onscreen_display_client.h
+++ b/content/browser/compositor/onscreen_display_client.h
@@ -34,14 +34,21 @@ class OnscreenDisplayClient : cc::DisplayClient {
// cc::DisplayClient implementation.
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface() OVERRIDE;
virtual void DisplayDamaged() OVERRIDE;
+ virtual void DidSwapBuffers() OVERRIDE;
+ virtual void DidSwapBuffersComplete() OVERRIDE;
private:
+ void ScheduleDraw();
void Draw();
scoped_ptr<cc::OutputSurface> output_surface_;
scoped_ptr<cc::Display> display_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
bool scheduled_draw_;
+ // True if a draw should be scheduled, but it's hit the limit on max frames
+ // pending.
+ bool deferred_draw_;
+ int pending_frames_;
base::WeakPtrFactory<OnscreenDisplayClient> weak_ptr_factory_;
« no previous file with comments | « cc/surfaces/display_client.h ('k') | content/browser/compositor/onscreen_display_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698