Bug 92301 - [BlackBerry] readPixels on FBOs are limited to canvas size on SGX platforms
Summary: [BlackBerry] readPixels on FBOs are limited to canvas size on SGX platforms
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-25 14:25 PDT by Joshua Netterfield
Modified: 2012-07-26 09:34 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.49 KB, patch)
2012-07-25 16:42 PDT, Joshua Netterfield
no flags Details | Formatted Diff | Diff
Patch (2.87 KB, patch)
2012-07-26 06:45 PDT, Joshua Netterfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.