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

Unified Diff: content/browser/compositor/gpu_browser_compositor_output_surface.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/gpu_browser_compositor_output_surface.h
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.h b/content/browser/compositor/gpu_browser_compositor_output_surface.h
index b5a581155d09fa6d669ce3c3e95b9e1ee78bf57a..2b3d2b76dbf68bbaecd5767c93d488f7431f09cc 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.h
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.h
@@ -37,9 +37,20 @@ class GpuBrowserCompositorOutputSurface
#if defined(OS_MACOSX)
void OnSurfaceDisplayed() override;
- void OnSurfaceRecycled() override;
- bool ShouldNotShowFramesAfterRecycle() const override;
- bool should_not_show_frames_;
+ void SetSurfaceSuspendedForRecycle(bool suspended) override;
+ bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override;
+ enum ShouldShowFramesState {
+ // Frames that come from the GPU process should appear on-screen.
+ SHOULD_SHOW_FRAMES,
+ // The compositor has been suspended. Any frames that come from the GPU
+ // process are for the pre-suspend content and should not be displayed.
+ SHOULD_NOT_SHOW_FRAMES_SUSPENDED,
+ // The compositor has been un-suspended, but has not yet issued a swap
+ // since being un-suspended, so any frames that come from the GPU process
+ // are for pre-suspend content and should not be displayed.
+ SHOULD_NOT_SHOW_FRAMES_NO_SWAP_AFTER_SUSPENDED,
+ };
+ ShouldShowFramesState should_show_frames_state_;
#endif
CommandBufferProxyImpl* GetCommandBufferProxy();

Powered by Google App Engine
This is Rietveld 408576698