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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 1016033006: Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 026e0e0dba7c2dedfe362aa361ca5f1130d9162b..8b283617d20758e9a231a918700697b9d1cf1cb0 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -214,6 +214,13 @@ void DelegatedFrameHost::EndFrameSubscription() {
frame_subscriber_.reset();
}
+void DelegatedFrameHost::UpdateVSyncParameters(
+ base::TimeTicks timebase,
+ base::TimeDelta interval) {
+ vsync_timebase_ = timebase;
+ vsync_interval_ = interval;
+}
+
bool DelegatedFrameHost::ShouldSkipFrame(gfx::Size size_in_dip) const {
// Should skip a frame only when another frame from the renderer is guaranteed
// to replace it. Otherwise may cause hangs when the renderer is waiting for
@@ -942,8 +949,11 @@ DelegatedFrameHost::~DelegatedFrameHost() {
surface_factory_->Destroy(surface_id_);
if (resource_collection_.get())
resource_collection_->SetClient(NULL);
-
+ // TODO(simonhong): Remove vsync manager when BeginFrame scheduling is enabled
+ // on all platform.
+#if 0
DCHECK(!vsync_manager_.get());
+#endif
}
void DelegatedFrameHost::RunOnCommitCallbacks() {
@@ -970,9 +980,11 @@ void DelegatedFrameHost::SetCompositor(ui::Compositor* compositor) {
return;
compositor_ = compositor;
compositor_->AddObserver(this);
+#if 0
danakj 2015/03/24 17:46:24 I'm not sure what is going on in this CL sorry. Yo
DCHECK(!vsync_manager_.get());
vsync_manager_ = compositor_->vsync_manager();
vsync_manager_->AddObserver(this);
+#endif
}
void DelegatedFrameHost::ResetCompositor() {
@@ -985,10 +997,12 @@ void DelegatedFrameHost::ResetCompositor() {
}
if (compositor_->HasObserver(this))
compositor_->RemoveObserver(this);
+#if 0
if (vsync_manager_.get()) {
vsync_manager_->RemoveObserver(this);
vsync_manager_ = NULL;
}
+#endif
compositor_ = nullptr;
}
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698