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

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

Issue 1097223002: Mac: Fix black flashing during tab switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wait for swap to draw frames Created 5 years, 8 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/browser_compositor_view_mac.h
diff --git a/content/browser/compositor/browser_compositor_view_mac.h b/content/browser/compositor/browser_compositor_view_mac.h
index 41e8bc24ab332d9dff153adcdf48dab071f92786..28b824eedc9c80e6720012ac63285e7e9fec9564 100644
--- a/content/browser/compositor/browser_compositor_view_mac.h
+++ b/content/browser/compositor/browser_compositor_view_mac.h
@@ -7,6 +7,7 @@
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/compositor/compositor.h"
+#include "ui/compositor/compositor_observer.h"
namespace content {
@@ -14,9 +15,9 @@ namespace content {
// into. This structure is used to efficiently recycle these structures across
// tabs (because creating a new ui::Compositor for each tab would be expensive
// in terms of time and resources).
-class BrowserCompositorMac {
+class BrowserCompositorMac : public ui::CompositorObserver {
public:
- ~BrowserCompositorMac();
+ virtual ~BrowserCompositorMac();
// Create a compositor, or recycle a preexisting one.
static scoped_ptr<BrowserCompositorMac> Create();
@@ -42,6 +43,15 @@ class BrowserCompositorMac {
private:
BrowserCompositorMac();
+ // ui::CompositorObserver implementation:
+ void OnCompositingDidCommit(ui::Compositor* compositor) override;
+ void OnCompositingStarted(ui::Compositor* compositor,
+ base::TimeTicks start_time) override {}
+ void OnCompositingEnded(ui::Compositor* compositor) override {}
+ void OnCompositingAborted(ui::Compositor* compositor) override {}
+ void OnCompositingLockStateChanged(ui::Compositor* compositor) override {}
+ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
+
scoped_ptr<ui::AcceleratedWidgetMac> accelerated_widget_mac_;
ui::Compositor compositor_;
scoped_refptr<ui::CompositorLock> compositor_suspended_lock_;

Powered by Google App Engine
This is Rietveld 408576698