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

Unified Diff: content/browser/compositor/image_transport_factory.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/image_transport_factory.h
diff --git a/content/browser/compositor/image_transport_factory.h b/content/browser/compositor/image_transport_factory.h
index 5142f2468d122e2a3d6deb64b41bc922537b9bd4..e9aa0390023e0fd57587c7d5dc30b008992760a4 100644
--- a/content/browser/compositor/image_transport_factory.h
+++ b/content/browser/compositor/image_transport_factory.h
@@ -85,13 +85,18 @@ class CONTENT_EXPORT ImageTransportFactory {
#if defined(OS_MACOSX)
virtual void OnSurfaceDisplayed(int surface_id) = 0;
- // Called when the ui::Compositor has been disconnected from an NSView and
- // may be attached to another one. This ensures that content and frames
- // intended for the old NSView will not appear in the new NSView.
- virtual void OnCompositorRecycled(ui::Compositor* compositor) = 0;
+ // Called with |suspended| as true when the ui::Compositor has been
+ // disconnected from an NSView and may be attached to another one. Called
+ // with |suspended| as false after the ui::Compositor has been connected to
+ // a new NSView and the first commit targeted at the new NSView has
+ // completed. This ensures that content and frames intended for the old
+ // NSView will not flash in the new NSView.
+ virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
+ bool suspended) = 0;
// Used by GpuProcessHostUIShim to determine if a frame should not be
// displayed because it is targetted to an NSView that has been disconnected.
- virtual bool SurfaceShouldNotShowFramesAfterRecycle(int surface_id) const = 0;
+ virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle(
+ int surface_id) const = 0;
#endif
};
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698