From: commit-queue@webkit.org Date: Tue, 26 Jun 2012 17:56:46 +0000 (+0000) Subject: [chromium] Add the workaround of IOSurface-related corruption during readback on... X-Git-Tag: 070512121124~619 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61317020d851aebfc16a5ba52c21a8ae110bdc3b;p=profile%2Fivi%2Fwebkit-efl.git [chromium] Add the workaround of IOSurface-related corruption during readback on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=89797 Patch by Yasuhiro Matsuda on 2012-06-26 Reviewed by James Robinson. No new tests. This patch doesn't change behavior. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::getFramebufferPixels): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121267 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 85e4278..59c5bda 100755 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2012-06-26 Yasuhiro Matsuda + + [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 Web Inspector: Native memory snapshots crash in debug mode. diff --git a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp index 2624c0e..ca2d190 100644 --- a/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp +++ b/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp @@ -115,16 +115,10 @@ static WebTransformationMatrix screenMatrix(int x, int y, int width, int height) 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 @@ -1260,13 +1254,13 @@ void LayerRendererChromium::getFramebufferPixels(void *pixels, const IntRect& re 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.