[c3d] getImageData missing

RESOLVED INVALID

Status

()

RESOLVED INVALID
10 years ago
8 years ago

People

(Reporter: ilmari.heikkinen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2a1pre) Gecko/20090226 Minefield/3.2a1pre
Build Identifier: 

There's no getImageData implementation in the 3d canvas. GetImageData should read from the visible image on the pbuffer surface. 


Reproducible: Always

Steps to Reproduce:
1. gl.getImageData(0,0,1,1)

Actual Results:  
Error, no getImageData method.

Expected Results:  
Should have returned an imagedata object {width:1, height:1, data:[r,g,b,a]}.
(Reporter)

Comment 1

10 years ago
Created attachment 364482 [details] [diff] [review]
Patch that adds getImageData and implements GetInputStream

Implementations for GetImageData and GetInputStream adapted
from nsCanvasRenderingContext2D.cpp

ToDataURL doesn't work, probably because ToDataURLImpl in
content/html/content/src/nsHTMLCanvasElement.cpp
has the 2D context assumption hardcoded
( GetContext(NS_LITERAL_STRING("2d"), getter_AddRefs(context)) )
(Reporter)

Comment 2

10 years ago
Created attachment 364483 [details]
Testcase for gl.getImageData [and FBOs and gl.readPixels and a failing toDataURL test]
(Reporter)

Comment 3

10 years ago
Created attachment 365146 [details] [diff] [review]
Updated patch, depends on the glReadPixels patch for CheckSaneSubrectSize
Attachment #364482 - Attachment is obsolete: true
Attachment #365146 - Flags: review?(vladimir)
(Reporter)

Comment 4

10 years ago
Created attachment 365148 [details]
reduction of the bigger test
Attachment #364483 - Attachment is obsolete: true
(Reporter)

Updated

10 years ago
Attachment #365148 - Attachment is patch: false
Attachment #365148 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 5

10 years ago
Comment on attachment 365146 [details] [diff] [review]
Updated patch, depends on the glReadPixels patch for CheckSaneSubrectSize

Argh, GetInputStream doesn't use OPERATOR_SOURCE, so you get garbled data.
Attachment #365146 - Attachment is obsolete: true
Attachment #365146 - Flags: review?(vladimir)
(Reporter)

Comment 6

10 years ago
Created attachment 365553 [details] [diff] [review]
Now does GetInputStream compositing with OPERATOR_SOURCE
Component: Canvas: 2D → Canvas: WebGL
getImageData doesn't exist in the current WebGL spec.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.