Closed Bug 566126 Opened 14 years ago Closed 14 years ago

Allow readPixels on arbitrary-sized non-default framebuffer (can be bigger than canvas)

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cedricv, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.38 Safari/533.4
Build Identifier: 

Right now it is possible to use readPixels on FF only when bound framebuffer is the default framebuffer or a framebuffer of smaller or equal dimensions.


Reproducible: Always

Steps to Reproduce:
1. Run new WebGL uninitialized-test.html ( http://neonux.com/webgl/sdk/tests/fast/uninitialized-test.html )
2. FAIL because of the renderbuffer is bigger than the canvas

Actual Results:  
NS_ERROR...

Expected Results:  
get the pixels
Attached patch FixSplinter Review
Might depend on the small patch sent on 3dweb list.
This also makes new framebuffer/renderbuffer tests pass on FF except one.
Attachment #445545 - Flags: review?(vladimir)
Comment on attachment 445545 [details] [diff] [review]
Fix

This looks fine, thanks!

I'm going to split the piece of teximage2d that passes data with 0 values instead of NULL into a separate patch though when checking in.
Attachment #445545 - Flags: review?(vladimir) → review+
(In reply to comment #2)
> (From update of attachment 445545 [details] [diff] [review])
> I'm going to split the piece of teximage2d that passes data with 0 values
> instead of NULL into a separate patch though when checking in.

Just in case you forgot, passing NULL from JS requires the 3dweb patch that I should have posted here as well now that I think about it ;)
=> http://neonux.com/webgl/mozilla-texImage2D-null.patch
Yep, I've filed bug 566676 with that; I made a few changes to the patch, but no substance (null is a valid object, so no need to handle it separately).
Status: UNCONFIRMED → NEW
Ever confirmed: true
http://hg.mozilla.org/mozilla-central/rev/8fcaaf8e4bf9
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: