Closed Bug 1206915 Opened 9 years ago Closed 9 years ago

Fix paint dumping

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: botond, Assigned: botond)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

We have code to dump display item and layer textures for debugging purposes. However, it apparently hasn't been used for a while and has been broken along the way. Let's fix it because it's a useful debugging tool (and I'd like to use it to debug 1205630).
Blocks: 1205630
Bug 1206915 - Move dumping of compositor textures under its own environment variable. r=mattwoodrow

The rationale is that it's broken at least on some platforms (e.g.
TextureHost::GetAsSurface() is not implemented), and moving it under its own
environment variable allows us to use the client-side parts of paint dumping
without crashing while attempting to do the compositor-side parts.
Attachment #8663958 - Flags: review?(matt.woodrow)
Bug 1206915 - Avoid reordering of different parts of paint dump output. r=mattwoodrow
Attachment #8663959 - Flags: review?(matt.woodrow)
Bug 1206915 - Make paint dumping to a file e10s-friendly. r=mattwoodrow
Attachment #8663960 - Flags: review?(matt.woodrow)
Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow
Attachment #8663961 - Flags: review?(matt.woodrow)
[WIP] Bug 1206915 - Dump client-side layer textures
The first four patches fix the dumping of display items with links to their rendered textures in an HTML file.

The fifth patch aims to dump layer textures on the client side (as dumping on the compositor side is not implemented on all platforms and requires more infrastructure to implement), but isn't quite working yet.
https://reviewboard.mozilla.org/r/19887/#review17933

::: layout/base/nsLayoutUtils.cpp:2886
(Diff revision 1)
> +// nsLayoutUtils::PaintFrame() can call itself recursively, so rather than

What causes these nested paint calls? It shouldn't call itself recursively.
(In reply to Markus Stange [:mstange] from comment #7)
> https://reviewboard.mozilla.org/r/19887/#review17933
> 
> ::: layout/base/nsLayoutUtils.cpp:2886
> (Diff revision 1)
> > +// nsLayoutUtils::PaintFrame() can call itself recursively, so rather than
> 
> What causes these nested paint calls? It shouldn't call itself recursively.

It shouldn't, but it does.

External svg documents as images is the case we were seeing, but I think -moz-element does it too. There may be other cases.
Comment on attachment 8663958 [details]
MozReview Request: Bug 1206915 - Move dumping of compositor textures under its own environment variable. r=mattwoodrow

https://reviewboard.mozilla.org/r/19881/#review17959
Attachment #8663958 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8663959 [details]
MozReview Request: Bug 1206915 - Avoid reordering of different parts of paint dump output. r=mattwoodrow

https://reviewboard.mozilla.org/r/19883/#review17961
Attachment #8663959 - Flags: review?(matt.woodrow) → review+
Attachment #8663960 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8663960 [details]
MozReview Request: Bug 1206915 - Make paint dumping to a file e10s-friendly. r=mattwoodrow

https://reviewboard.mozilla.org/r/19885/#review17963
Comment on attachment 8663961 [details]
MozReview Request: Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow

https://reviewboard.mozilla.org/r/19887/#review17965
Attachment #8663961 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8663962 [details]
MozReview Request: [WIP] Bug 1206915 - Dump client-side layer textures

Let's land the patches that have been reviewed. I'll file a new bug for client-side texture dumping.
Attachment #8663962 - Attachment is obsolete: true
Blocks: 1208661
Blocks: 1208664
Assignee: nobody → botond
The Try push is indicating that I'm leaking a (single) nsTArray object. Presumably it's the

  StaticAutoPtr<nsTArray<int>> gPaintCountStack;

that I've added in nsLayoutUtils.cpp. Am I supposed to clear that somewhere?
(In reply to Botond Ballo [:botond] from comment #15)
> The Try push is indicating that I'm leaking a (single) nsTArray object.
> Presumably it's the
> 
>   StaticAutoPtr<nsTArray<int>> gPaintCountStack;
> 
> that I've added in nsLayoutUtils.cpp. Am I supposed to clear that somewhere?

Apparently yes, with ClearOnShutdown().
Comment on attachment 8663958 [details]
MozReview Request: Bug 1206915 - Move dumping of compositor textures under its own environment variable. r=mattwoodrow

Bug 1206915 - Move dumping of compositor textures under its own environment variable. r=mattwoodrow

The rationale is that it's broken at least on some platforms (e.g.
TextureHost::GetAsSurface() is not implemented), and moving it under its own
environment variable allows us to use the client-side parts of paint dumping
without crashing while attempting to do the compositor-side parts.
Comment on attachment 8663959 [details]
MozReview Request: Bug 1206915 - Avoid reordering of different parts of paint dump output. r=mattwoodrow

Bug 1206915 - Avoid reordering of different parts of paint dump output. r=mattwoodrow
Comment on attachment 8663960 [details]
MozReview Request: Bug 1206915 - Make paint dumping to a file e10s-friendly. r=mattwoodrow

Bug 1206915 - Make paint dumping to a file e10s-friendly. r=mattwoodrow
Comment on attachment 8663961 [details]
MozReview Request: Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow

Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow
Comment on attachment 8663961 [details]
MozReview Request: Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow

Updated to add ClearOnShutdown() call. Re-requesting review.
Attachment #8663961 - Flags: review+ → review?(matt.woodrow)
Comment on attachment 8663961 [details]
MozReview Request: Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow

Asking BenWa for review instead as Matt is on PTO.
Attachment #8663961 - Flags: review?(matt.woodrow) → review?(bgirard)
Comment on attachment 8663961 [details]
MozReview Request: Bug 1206915 - Handle nested PaintFrame() calls correctly during paint dumping. r=mattwoodrow

https://reviewboard.mozilla.org/r/19887/#review18437

Looks good
Attachment #8663961 - Flags: review?(bgirard) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: