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

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

Issue 720333005: Add DisplayScheduler to enable BeginFrame-based scheduling of surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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: 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 206f79a322cf9de9ff7d108ecb81e4f7515c8648..f39531ee7249a815c2c2b39a1da2aed91aa27bed 100644
--- a/content/browser/compositor/onscreen_display_client.h
+++ b/content/browser/compositor/onscreen_display_client.h
@@ -14,6 +14,7 @@
namespace cc {
class ContextProvider;
+class DisplayScheduler;
class SurfaceManager;
}
@@ -37,30 +38,17 @@ class OnscreenDisplayClient : cc::DisplayClient {
}
// cc::DisplayClient implementation.
- void DisplayDamaged() override;
- void DidSwapBuffers() override;
- void DidSwapBuffersComplete() override;
void CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) override;
void OutputSurfaceLost() override;
void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
private:
- void ScheduleDraw();
- void Draw();
-
scoped_ptr<cc::OutputSurface> output_surface_;
scoped_ptr<cc::Display> display_;
+ scoped_ptr<cc::DisplayScheduler> scheduler_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
SurfaceDisplayOutputSurface* surface_display_output_surface_;
- bool scheduled_draw_;
- bool output_surface_lost_;
- // 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_;
DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient);
};

Powered by Google App Engine
This is Rietveld 408576698