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

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

Issue 1124523003: Revert of Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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.h
diff --git a/content/browser/compositor/delegated_frame_host.h b/content/browser/compositor/delegated_frame_host.h
index 917623ef506f02e1e89a482a7a5ef92baa5fdaad..f208c267e3f2eab3da530a6a29402c33a83a6d03 100644
--- a/content/browser/compositor/delegated_frame_host.h
+++ b/content/browser/compositor/delegated_frame_host.h
@@ -18,6 +18,7 @@
#include "content/public/browser/render_process_host.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_observer.h"
+#include "ui/compositor/compositor_vsync_manager.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_owner_delegate.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -60,6 +61,10 @@
int output_surface_id,
const cc::CompositorFrameAck& ack) = 0;
virtual void DelegatedFrameHostOnLostCompositorResources() = 0;
+
+ virtual void DelegatedFrameHostUpdateVSyncParameters(
+ const base::TimeTicks& timebase,
+ const base::TimeDelta& interval) = 0;
};
// The DelegatedFrameHost is used to host all of the RenderWidgetHostView state
@@ -68,6 +73,7 @@
// the ui::Compositor associated with its DelegatedFrameHostClient.
class CONTENT_EXPORT DelegatedFrameHost
: public ui::CompositorObserver,
+ public ui::CompositorVSyncManager::Observer,
public ui::LayerOwnerDelegate,
public ImageTransportFactoryObserver,
public DelegatedFrameEvictorClient,
@@ -93,7 +99,6 @@
gfx::Size GetRequestedRendererSize() const;
void SetCompositor(ui::Compositor* compositor);
void ResetCompositor();
- void SetVSyncParameters(base::TimeTicks timebase, base::TimeDelta interval);
// Note: |src_subset| is specified in DIP dimensions while |output_size|
// expects pixels.
void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
@@ -152,6 +157,10 @@
void OnCompositingAborted(ui::Compositor* compositor) override;
void OnCompositingLockStateChanged(ui::Compositor* compositor) override;
void OnCompositingShuttingDown(ui::Compositor* compositor) override;
+
+ // Overridden from ui::CompositorVSyncManager::Observer:
+ void OnUpdateVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) override;
// Overridden from ui::LayerOwnerObserver:
void OnLayerRecreated(ui::Layer* old_layer, ui::Layer* new_layer) override;
@@ -234,8 +243,11 @@
std::vector<base::Closure> on_compositing_did_commit_callbacks_;
+ // The vsync manager we are observing for changes, if any.
+ scoped_refptr<ui::CompositorVSyncManager> vsync_manager_;
+
// The current VSync timebase and interval. These are zero until the first
- // call to UpdateVSyncParameters().
+ // call to OnUpdateVSyncParameters().
base::TimeTicks vsync_timebase_;
base::TimeDelta vsync_interval_;
« no previous file with comments | « content/browser/compositor/browser_compositor_output_surface.cc ('k') | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698