Bug 132121 - [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
Summary: [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andrei Bucur
URL:
Keywords: AdobeTracked
Depends on: 132965
Blocks: 128243
  Show dependency treegraph
 
Reported: 2014-04-24 02:56 PDT by Andrei Bucur
Modified: 2014-05-16 06:22 PDT (History)
15 users (show)

See Also:


Attachments
WIP (73.38 KB, patch)
2014-05-15 07:17 PDT, Andrei Bucur
no flags Details | Formatted Diff | Diff
Patch (78.18 KB, patch)
2014-05-15 08:01 PDT, Andrei Bucur
no flags Details | Formatted Diff | Diff
Patch with fixed typo (78.18 KB, patch)
2014-05-15 08:03 PDT, Andrei Bucur
koivisto: review+
Details | Formatted Diff | Diff
Patch for landing (94.95 KB, patch)
2014-05-15 09:03 PDT, Andrei Bucur
abucur: commit-queue-
Details | Formatted Diff | Diff
Patch for landing v2 (91.63 KB, patch)
2014-05-15 09:05 PDT, Andrei Bucur
no flags Details | Formatted Diff | Diff
Patch v2 (93.43 KB, patch)
2014-05-16 05:35 PDT, Andrei Bucur
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Bucur 2014-04-24 02:56:29 PDT
During the layout of the flow threads, they are cached to prevent slow tree walks. We can apply the same technique at paint time as well.
Comment 1 Andrei Bucur 2014-05-15 07:17:31 PDT
Created attachment 231511 [details]
WIP
Comment 2 Andrei Bucur 2014-05-15 08:01:26 PDT
Created attachment 231513 [details]
Patch
Comment 3 Andrei Bucur 2014-05-15 08:03:10 PDT
Created attachment 231514 [details]
Patch with fixed typo
Comment 4 Antti Koivisto 2014-05-15 08:10:56 PDT
Comment on attachment 231514 [details]
Patch with fixed typo

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

r=me

> Source/WebCore/rendering/RenderLayer.cpp:4475
> +        PaintInfo paintInfo(context, fragment.foregroundRect.rect(), phase, paintBehavior, subtreePaintRootForRenderer, 0, 0, &localPaintingInfo.rootLayer->renderer());

You could also turn 0's into nullptrs here and various other places since you are touching them.

> Source/WebCore/rendering/RenderLayer.h:713
> +    bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0, const LayoutRect* cachedBoundingBox = 0) const;

nullptr

> Source/WebCore/rendering/RenderLayer.h:963
> +        LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, RenderObject* inSubtreePaintRoot = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)

nullptr
Comment 5 Andrei Bucur 2014-05-15 09:03:17 PDT
Created attachment 231520 [details]
Patch for landing
Comment 6 Andrei Bucur 2014-05-15 09:05:22 PDT
Created attachment 231521 [details]
Patch for landing v2
Comment 7 WebKit Commit Bot 2014-05-15 09:43:37 PDT
Comment on attachment 231521 [details]
Patch for landing v2

Clearing flags on attachment: 231521

Committed r168899: <http://trac.webkit.org/changeset/168899>
Comment 8 WebKit Commit Bot 2014-05-15 09:43:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 WebKit Commit Bot 2014-05-15 12:11:32 PDT
Re-opened since this is blocked by bug 132965
Comment 10 Andrei Bucur 2014-05-16 05:35:32 PDT
Created attachment 231569 [details]
Patch v2
Comment 11 Andrei Bucur 2014-05-16 05:43:04 PDT
Comment on attachment 231569 [details]
Patch v2

The difference between this patch and the one previously landed is the commented ASSERT inside RenderObject::currentRenderNamedFlowFragment().

Because compositing is not yet fully integrated with regions there are calls to the function during layout (so the current flow thread is set) to determine the ancestor clipping rectangle of a layer. There's a FIXME in RenderLayerCompositor that the code doesn't work with regions because we don't know the containing region at that point. Once we fix that we can re-enable the assert.
Comment 12 WebKit Commit Bot 2014-05-16 06:22:30 PDT
Comment on attachment 231569 [details]
Patch v2

Clearing flags on attachment: 231569

Committed r168967: <http://trac.webkit.org/changeset/168967>
Comment 13 WebKit Commit Bot 2014-05-16 06:22:37 PDT
All reviewed patches have been landed.  Closing bug.