Work around Mac OS 10.9 window server synchronization bug.
When using the integrated GPU with multiple windows open, the display
will shudder and flicker. It appears that the front and back buffers
are fighting to be displayed (sometimes the previous frame is shown,
sometimes the new frame is shown). When a glFinish is added here, the
bug goes away.
BUG=318877
Review URL: https://codereview.chromium.org/103943011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241431 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index dff0413..b5759ed 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -450,7 +450,8 @@
}
const bool workaround_needed =
- drawing_context->IsVendorIntel() && !base::mac::IsOSMountainLionOrLater();
+ drawing_context->IsVendorIntel() &&
+ (!base::mac::IsOSMountainLionOrLater() || base::mac::IsOSMavericks());
const bool use_glfinish_workaround =
(workaround_needed || force_on_workaround) && !force_off_workaround;
@@ -459,8 +460,10 @@
// http://crbug.com/123409 : work around bugs in graphics driver on
// MacBook Air with Intel HD graphics, and possibly on other models,
// by forcing the graphics pipeline to be completely drained at this
- // point.
- // This workaround is not necessary on Mountain Lion.
+ // point. This workaround is not necessary on Mountain Lion.
+ // http://crbug.com/318877 : work around a bug where the window does
+ // not finish rendering its contents before displaying them on Mavericks
+ // on Retina MacBook Pro when using the Intel HD graphics GPU.
glFinish();
}