Closed Bug 1475637 Opened 6 years ago Closed 6 years ago

Provide a useful logging mechanism to go from the gecko display list to the WR display list

Categories

(Core :: Graphics: WebRender, enhancement, P5)

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file, 3 obsolete files)

The ifdef in WebRenderLayerManager sort of does this, but it prints the gecko DL and the WR DL separately so it's hard to map items in one to items in the other. What I want is an interleaved dump, which prints out the WR DL items generated for each gecko DL item.

I have patches that do this.
Ugh, the part 1 patch doesn't put the wrap list display items in the right place. Need to fix that.
Attached patch Part 1 - Dumping patch (obsolete) — Splinter Review
Attachment #8991998 - Attachment is obsolete: true
Priority: -- → P5
Attachment #8991997 - Attachment is obsolete: true
Attachment #8992413 - Attachment is obsolete: true
Comment on attachment 8993463 [details]
Bug 1475637 - Add a mechanism for dumping an interleaved display list.

https://reviewboard.mozilla.org/r/258204/#review265214


Code analysis found 4 defects in this patch:
 - 4 defects found by clang-tidy

You can run this analysis locally with:
 - `./mach static-analysis check path/to/file.cpp` (C/C++)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: gfx/layers/wr/WebRenderLayerManager.cpp:297
(Diff revision 1)
>  
>    mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
>    mWindowOverlayChanged = false;
> +  if (dumpEnabled) {
> +    printf_stderr("(window overlay)\n");
> +    builderDumpIndex = builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());

Warning: Value stored to 'builderDumpIndex' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]

    builderDumpIndex = builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
    ^

::: gfx/layers/wr/WebRenderLayerManager.cpp:297
(Diff revision 1)
>  
>    mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder, resourceUpdates);
>    mWindowOverlayChanged = false;
> +  if (dumpEnabled) {
> +    printf_stderr("(window overlay)\n");
> +    builderDumpIndex = builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());

Warning: Value stored to 'builderDumpIndex' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]

    builderDumpIndex = builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
    ^

::: gfx/webrender_bindings/WebRenderAPI.cpp:761
(Diff revision 1)
>  void DisplayListBuilder::Restore() { wr_dp_restore(mWrState); }
>  void DisplayListBuilder::ClearSave() { wr_dp_clear_save(mWrState); }
> -void DisplayListBuilder::Dump() { wr_dump_display_list(mWrState); }
>  
> +usize DisplayListBuilder::Dump(usize aIndent,
> +                              Maybe<usize> aStart,

Error: Type 'Maybe<mozilla::wr::usize>' (aka 'Maybe<unsigned long>') must not be used as parameter [clang-tidy: mozilla-non-memmovable-template-arg]

                              Maybe<usize> aStart,
                                           ^

::: gfx/webrender_bindings/WebRenderAPI.cpp:762
(Diff revision 1)
>  void DisplayListBuilder::ClearSave() { wr_dp_clear_save(mWrState); }
> -void DisplayListBuilder::Dump() { wr_dump_display_list(mWrState); }
>  
> +usize DisplayListBuilder::Dump(usize aIndent,
> +                              Maybe<usize> aStart,
> +                              Maybe<usize> aEnd)

Error: Type 'Maybe<mozilla::wr::usize>' (aka 'Maybe<unsigned long>') must not be used as parameter [clang-tidy: mozilla-non-memmovable-template-arg]

                              Maybe<usize> aEnd)
                                           ^
Whoops, that updated patch is the same as the original patch.
Comment on attachment 8993463 [details]
Bug 1475637 - Add a mechanism for dumping an interleaved display list.

https://reviewboard.mozilla.org/r/258204/#review265226
Attachment #8993463 - Flags: review?(jmuizelaar) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e38a0f11e03
Add a mechanism for dumping an interleaved display list. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/6e38a0f11e03
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: