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

Unified Diff: trunk/src/content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 161743002: Revert 250798 "Revert of Read compositor VSync information from ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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: trunk/src/content/browser/renderer_host/render_widget_host_view_aura.cc
===================================================================
--- trunk/src/content/browser/renderer_host/render_widget_host_view_aura.cc (revision 250808)
+++ trunk/src/content/browser/renderer_host/render_widget_host_view_aura.cc (working copy)
@@ -3229,7 +3229,6 @@
}
void RenderWidgetHostViewAura::OnUpdateVSyncParameters(
- ui::Compositor* compositor,
base::TimeTicks timebase,
base::TimeDelta interval) {
if (IsShowing()) {
@@ -3530,6 +3529,10 @@
legacy_render_widget_host_HWND_->UpdateParent(
reinterpret_cast<HWND>(GetNativeViewId()));
#endif
+
+ ui::Compositor* compositor = GetCompositor();
+ if (compositor)
+ compositor->vsync_manager()->AddObserver(this);
}
void RenderWidgetHostViewAura::RemovingFromRootWindow() {
@@ -3553,9 +3556,13 @@
RunOnCommitCallbacks();
resize_lock_.reset();
host_->WasResized();
- if (compositor && compositor->HasObserver(this))
- compositor->RemoveObserver(this);
+ if (compositor) {
+ if (compositor->HasObserver(this))
+ compositor->RemoveObserver(this);
+ compositor->vsync_manager()->RemoveObserver(this);
+ }
+
#if defined(OS_WIN)
// Update the legacy window's parent temporarily to the desktop window. It
// will eventually get reparented to the right root.

Powered by Google App Engine
This is Rietveld 408576698