Closed Bug 1082902 Opened 5 years ago Closed 5 years ago

Debugging helpers

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: cjones, Assigned: cjones)

Details

Attachments

(2 files)

I wrote two patches to help me debug rendering problems.  The first patch adds a new MOZ_GL_DEBUGGING macro to enable GL debugging, so that it can be easily turned on in opt builds.  (Debug builds were a non-starter for my use case because they're too slow.)  The second patch adds a publicly-exported helper function |mozilla_dump_image()| from gfxUtils.  The helper accepts a pointer to raw bytes and image attributes and then dumps the image using DumpAsDataURI().  My use case for this was debugging the bowels of a GL implementation, from which it was quite inconvenient to directly use the DumpAsDataURI() helper.  This helper would also be useful when debugging the internals of other libraries like camera, webrtc, fonts, skia, etc.

I'm just tossing this code "over the wall", I'm not going to request review on these patches or fight for them to land.  If no one is interested please just WONTFIX this bug now so we don't waste our time.
Attachment #8505168 - Flags: review?(jgilbert)
Attachment #8505169 - Flags: review?(jmuizelaar)
(In reply to Chris Jones [:cjones] temporarily active; ni?/f?/r? if you need me from comment #0)
> I'm just tossing this code "over the wall", I'm not going to request review
> on these patches or fight for them to land.  If no one is interested please
> just WONTFIX this bug now so we don't waste our time.

I am interested, I'll do the fighting :)
Comment on attachment 8505168 [details] [diff] [review]
Guard GL debugging by MOZ_GL_DEBUG macro

Review of attachment 8505168 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/GLContext.h
@@ +28,5 @@
>  
> +// Define MOZ_GL_DEBUG unconditionally to enable GL debugging in opt
> +// builds.
> +#if defined(DEBUG)
> +# define MOZ_GL_DEBUG 1

Follow surrounding style.
#ifdef...
#define...
Attachment #8505168 - Flags: review?(jgilbert) → review+
Comment on attachment 8505169 [details] [diff] [review]
Add mozilla_dump_image() helper exported from libxul

Review of attachment 8505169 [details] [diff] [review]:
-----------------------------------------------------------------

Sure.
Attachment #8505169 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/8e283319cee6
Assignee: nobody → cjones.bugs
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
The second patch is r+ but didn't land.  It's been sent to try incidentally a couple of times without incident.  Reopening in case they're interest in landing, but feel free to re-close.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/064ea6bcfa0b
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.