Add a way to dump gfxASurfaces to a data url

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: mattwoodrow, Assigned: roc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Reporter)

Description

8 years ago
Created attachment 493554 [details] [diff] [review]
First attempt

Not sure if this should actually print to console, but its certainly easy to use from a debugger this way
(Reporter)

Updated

8 years ago
Attachment #493554 - Attachment is patch: true
Attachment #493554 - Attachment mime type: application/octet-stream → text/plain
(Reporter)

Comment 1

8 years ago
Created attachment 493556 [details] [diff] [review]
Add GetSize to gfxD2DSurface so DumpAsDataURL works
Attachment #493556 - Flags: review?(bas.schouten)
Attachment #493556 - Flags: review?(bas.schouten) → review+
I suggest you move the call to create the encoder down until you use the encoder. The encoder is sometimes not available (e.g. in plugin-container), and it's nice to still get to the part where we read the image data, because then you can at least read the data in the debugger.
(Reporter)

Comment 3

8 years ago
Created attachment 493610 [details] [diff] [review]
Add DumpAsDataURL()

Moved decoder initialization down.
Attachment #493554 - Attachment is obsolete: true
Attachment #493610 - Flags: review?(roc)
(Reporter)

Comment 4

8 years ago
Created attachment 493611 [details] [diff] [review]
Add GetSize to gfxD2DSurface so DumpAsDataURL works v2

Fixed compile error, carrying forward r=Bas
Attachment #493556 - Attachment is obsolete: true
Attachment #493611 - Flags: review+
(Reporter)

Updated

8 years ago
Attachment #493611 - Attachment is patch: true
Attachment #493611 - Attachment mime type: application/octet-stream → text/plain
Created attachment 493614 [details] [diff] [review]
improved (?)
Attachment #493614 - Flags: review?(matt.woodrow+bugzilla)
(Reporter)

Comment 6

8 years ago
Comment on attachment 493614 [details] [diff] [review]
improved (?)

Looks good, apart from the reftest.js debugging code that slipped in.
Attachment #493614 - Flags: review?(matt.woodrow+bugzilla) → review+
OS: Mac OS X → All
Comment on attachment 493614 [details] [diff] [review]
improved (?)

This is pretty insanely useful when dealing with surfaces for which there's no system tool available to visualize them.
Attachment #493614 - Flags: approval2.0?

Comment 8

8 years ago
Comment on attachment 493614 [details] [diff] [review]
improved (?)

not taking for Firefox 4. please hold until the trunk opens for post Firefox 4 changes.
Attachment #493614 - Flags: approval2.0? → approval2.0-
(Reporter)

Comment 9

8 years ago
http://hg.mozilla.org/mozilla-central/rev/e64ef5572e1b
Status: NEW → RESOLVED
Last Resolved: 8 years ago
OS: All → Mac OS X
Resolution: --- → FIXED

Updated

7 years ago
Attachment #493610 - Flags: review?(roc)

Updated

7 years ago
Assignee: nobody → roc
You need to log in before you can comment on or make changes to this bug.