+2012-06-26 Yasuhiro Matsuda <mazda@chromium.org>
+
+ [chromium] Add the workaround of IOSurface-related corruption during readback on Mac OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=89797
+
+ Reviewed by James Robinson.
+
+ No new tests. This patch doesn't change behavior.
+
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::getFramebufferPixels):
+
2012-06-26 Alexei Filippov <alexeif@chromium.org>
Web Inspector: Native memory snapshots crash in debug mode.
return screen;
}
-bool needsLionIOSurfaceReadbackWorkaround()
+bool needsIOSurfaceReadbackWorkaround()
{
#if OS(DARWIN)
- static SInt32 systemVersion = 0;
- if (!systemVersion) {
- if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
- return false;
- }
-
- return systemVersion >= 0x1070;
+ return true;
#else
return false;
#endif
makeContextCurrent();
- bool doWorkaround = needsLionIOSurfaceReadbackWorkaround();
+ bool doWorkaround = needsIOSurfaceReadbackWorkaround();
Platform3DObject temporaryTexture = NullPlatform3DObject;
Platform3DObject temporaryFBO = NullPlatform3DObject;
if (doWorkaround) {
- // On Mac OS X 10.7, calling glReadPixels against an FBO whose color attachment is an
+ // On Mac OS X, calling glReadPixels against an FBO whose color attachment is an
// IOSurface-backed texture causes corruption of future glReadPixels calls, even those on
// different OpenGL contexts. It is believed that this is the root cause of top crasher
// http://crbug.com/99393. <rdar://problem/10949687>