Bug 224595 - Add a mechanism to dump the PlatformCALayer subtree of a GraphicsLayer, for testing
Summary: Add a mechanism to dump the PlatformCALayer subtree of a GraphicsLayer, for t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-15 01:51 PDT by Tim Horton
Modified: 2021-04-22 17:36 PDT (History)
15 users (show)

See Also:


Attachments
Patch (73.80 KB, patch)
2021-04-15 01:53 PDT, Tim Horton
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (74.57 KB, patch)
2021-04-15 02:56 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (86.45 KB, patch)
2021-04-15 13:32 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2021-04-15 01:51:28 PDT
Add a mechanism to dump the PlatformCALayer subtree of a GraphicsLayer, for testing
Comment 1 Tim Horton 2021-04-15 01:53:59 PDT
Created attachment 426083 [details]
Patch
Comment 2 Tim Horton 2021-04-15 01:55:19 PDT
Chances are high that there are iOS rebaselines needed, I haven't run the tests on iOS yet.
Comment 3 Tim Horton 2021-04-15 02:56:44 PDT
Created attachment 426092 [details]
Patch
Comment 4 Sam Weinig 2021-04-15 08:38:28 PDT
Yay!!
Comment 5 Simon Fraser (smfr) 2021-04-15 11:46:48 PDT
Comment on attachment 426092 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426092&action=review

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:4040
> +    UNUSED_PARAM(flags);

hmm?

> Source/WebCore/platform/graphics/ca/PlatformCALayer.h:124
> +    virtual PlatformCALayerList sublayersForLogging() = 0;

const?

> Source/WebCore/rendering/RenderLayerCompositor.cpp:2276
> +    frameView.updateLayoutAndStyleIfNeededRecursive();

I feel like there were tests where we explicitly didn't want to update layout here.
Comment 6 Tim Horton 2021-04-15 12:23:08 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> Comment on attachment 426092 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426092&action=review
> 
> > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:4040
> > +    UNUSED_PARAM(flags);
> 
> hmm?

Whoops.

> > Source/WebCore/platform/graphics/ca/PlatformCALayer.h:124
> > +    virtual PlatformCALayerList sublayersForLogging() = 0;
> 
> const?

Sure.

> > Source/WebCore/rendering/RenderLayerCompositor.cpp:2276
> > +    frameView.updateLayoutAndStyleIfNeededRecursive();
> 
> I feel like there were tests where we explicitly didn't want to update
> layout here.

The internals caller did it before, so I don't know how that can be.
Comment 7 Tim Horton 2021-04-15 12:36:18 PDT
(In reply to Tim Horton from comment #6)
> (In reply to Simon Fraser (smfr) from comment #5)
> > Comment on attachment 426092 [details]
> > Patch
> > 
> > > Source/WebCore/rendering/RenderLayerCompositor.cpp:2276
> > > +    frameView.updateLayoutAndStyleIfNeededRecursive();
> > 
> > I feel like there were tests where we explicitly didn't want to update
> > layout here.
> 
> The internals caller did it before, so I don't know how that can be.

Frame did it too :) so many layouts
Comment 8 Tim Horton 2021-04-15 13:32:46 PDT
Created attachment 426131 [details]
Patch
Comment 9 Simon Fraser (smfr) 2021-04-15 14:42:29 PDT
Comment on attachment 426131 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426131&action=review

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:3967
> +        ts << indent << "(bounds " << layer->bounds().width() << " " << layer->bounds().height() << ")\n";

size rather than bounds?

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:3972
> +        if (!flags.contains(PlatformLayerTreeAsTextFlags::IgnoreChildren)) {

Double negative is a bit hard to read. Maybe the flag should be IncludeChildren?
Comment 10 Tim Horton 2021-04-15 15:59:45 PDT
(In reply to Simon Fraser (smfr) from comment #9)
> Comment on attachment 426131 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426131&action=review
> 
> > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:3967
> > +        ts << indent << "(bounds " << layer->bounds().width() << " " << layer->bounds().height() << ")\n";
> 
> size rather than bounds?

I'm going to leave this be because it matches GraphicsLayer.

> > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:3972
> > +        if (!flags.contains(PlatformLayerTreeAsTextFlags::IgnoreChildren)) {
> 
> Double negative is a bit hard to read. Maybe the flag should be
> IncludeChildren?

This too, mostly because I feel like the double negative is worth not having a flag set by default.
Comment 11 EWS 2021-04-15 16:32:11 PDT
Committed r276085 (236597@main): <https://commits.webkit.org/236597@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426131 [details].
Comment 12 Ryan Haddad 2021-04-22 17:36:38 PDT
rdar://76729543