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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

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_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index eff234961050493e94e65506f08e83249b5cd4e2..f2d1b3924d8dda6b3520fb81a3e7996496477671 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -469,8 +469,9 @@ void GpuProcessTransportFactory::OnSurfaceDisplayed(int surface_id) {
surface->OnSurfaceDisplayed();
}
-void GpuProcessTransportFactory::OnCompositorRecycled(
- ui::Compositor* compositor) {
+void GpuProcessTransportFactory::SetCompositorSuspendedForRecycle(
+ ui::Compositor* compositor,
+ bool suspended) {
PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
if (it == per_compositor_data_.end())
return;
@@ -479,15 +480,15 @@ void GpuProcessTransportFactory::OnCompositorRecycled(
BrowserCompositorOutputSurface* surface =
output_surface_map_.Lookup(data->surface_id);
if (surface)
- surface->OnSurfaceRecycled();
+ surface->SetSurfaceSuspendedForRecycle(suspended);
}
-bool GpuProcessTransportFactory::SurfaceShouldNotShowFramesAfterRecycle(
- int surface_id) const {
+bool GpuProcessTransportFactory::
+ SurfaceShouldNotShowFramesAfterSuspendForRecycle(int surface_id) const {
BrowserCompositorOutputSurface* surface =
output_surface_map_.Lookup(surface_id);
if (surface)
- return surface->ShouldNotShowFramesAfterRecycle();
+ return surface->SurfaceShouldNotShowFramesAfterSuspendForRecycle();
return false;
}
#endif
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698