Bug 92301

Summary: [BlackBerry] readPixels on FBOs are limited to canvas size on SGX platforms
Product: WebKit Reporter: Joshua Netterfield <jnetterfield>
Component: WebKit BlackBerryAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: noam, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Joshua Netterfield 2012-07-25 14:25:38 PDT
We use a workaround for readPixels because of some problems the SGX driver has with reading pixels. This workaround is currently limited to the size of the canvas.
Comment 1 Joshua Netterfield 2012-07-25 16:42:26 PDT
Created attachment 154479 [details]
Patch
Comment 2 Rob Buis 2012-07-25 19:32:49 PDT
Comment on attachment 154479 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154479&action=review

> Source/WebCore/ChangeLog:8
> +        This fixes an existing test (uninitialized-test), no new tests.

Better state which one.

> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:120
> +    readPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

This seems not BB specific? Is it safe to do?
Comment 3 Joshua Netterfield 2012-07-26 06:43:46 PDT
Right. Forgot about the anti-aliasing stuff on other platforms. I wonder if it's intentionally not in readPixelsAndConvertToBGRAIfNecessary...
Comment 4 Joshua Netterfield 2012-07-26 06:45:25 PDT
Created attachment 154642 [details]
Patch
Comment 5 Rob Buis 2012-07-26 07:04:57 PDT
Comment on attachment 154642 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154642&action=review

Better :)

> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:127
> +        ::glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

You do the same thing twice, could add a helper method for that, but as we discussed can be done later.
Comment 6 WebKit Review Bot 2012-07-26 09:34:51 PDT
Comment on attachment 154642 [details]
Patch

Clearing flags on attachment: 154642

Committed r123759: <http://trac.webkit.org/changeset/123759>
Comment 7 WebKit Review Bot 2012-07-26 09:34:55 PDT
All reviewed patches have been landed.  Closing bug.