Closed Bug 1314001 Opened 3 years ago Closed 3 years ago

Implement pref:layers.paintMask

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: u459114, Assigned: u459114)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

A preference helps css-mask debugging.
1. Default value of layers.paintMask is false.
2. When layers.paintMask is set, paint mask surface as color surface and discard  masked content rendering, then we can see the shape and position of mask on screen.
Assignee: nobody → cku
While developing mask, 
1. masked content look weird. It might be caused by generate wrong mask surface. I need to set break point in gdb and call gfxContext::WriteAsPNG to dump mask surface to know how mask look like.
2. Use report a bug said something wrong with mask. I need a quicker way to find out where is the mask visually.
There are reasons for constructing this preference.
Attachment #8807422 - Flags: review?(mstange)
Attachment #8807423 - Flags: review?(mstange)
Comment on attachment 8807422 [details]
Bug 1314001 - Part 1. Add pref: layers.draw-mask-debug.

https://reviewboard.mozilla.org/r/90564/#review90508

::: gfx/thebes/gfxPrefs.h:525
(Diff revision 1)
>    DECL_GFX_PREF(Live, "layers.tiles.fade-in.enabled",          LayerTileFadeInEnabled, bool, false);
>    DECL_GFX_PREF(Live, "layers.tiles.fade-in.duration-ms",      LayerTileFadeInDuration, uint32_t, 250);
>    DECL_GFX_PREF(Live, "layers.transaction.warning-ms",         LayerTransactionWarning, uint32_t, 200);
>    DECL_GFX_PREF(Once, "layers.uniformity-info",                UniformityInfo, bool, false);
>    DECL_GFX_PREF(Once, "layers.use-image-offscreen-surfaces",   UseImageOffscreenSurfaces, bool, true);
> +  DECL_GFX_PREF(Live, "layers.draw-mask-layer",          DrawMaskLayer, bool, false);

I think the name should have "debug" somewhere in its name. How about:

layers.mask-debug-overlay
layers.draw-mask-debug
nglayout.debug.mask_fill
Attachment #8807422 - Flags: review?(mstange) → review+
Comment on attachment 8807423 [details]
Bug 1314001 - Part 2. Draw mask by single opaque green.

https://reviewboard.mozilla.org/r/90566/#review90510
Attachment #8807423 - Flags: review?(mstange) → review+
Pushed by cku@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/db9d20ea9e05
Part 1. Add pref: layers.draw-mask-debug. r=mstange
https://hg.mozilla.org/integration/autoland/rev/19fabb7bf063
Part 2. Draw mask by single opaque green. r=mstange
https://hg.mozilla.org/mozilla-central/rev/db9d20ea9e05
https://hg.mozilla.org/mozilla-central/rev/19fabb7bf063
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a9a6e524a7b21fec801bda1679fb06e721628b6
Bug 1314001 - (followup) give different color to different kind of mask. r=me
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2b309cad8cab5a02175e9be55da7ddae905ac3d
Bug 1314001 - (followup) give different color to different kind of mask. r=me
You need to log in before you can comment on or make changes to this bug.