Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Issue 698743002: [WIP] Adding support for <iframe>s to slimming paint. (Closed)

Created:
6 years, 1 month ago by trchen
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, zoltan1
Project:
blink
Visibility:
Public.

Description

[WIP] Adding support for <iframe>s to slimming paint. This CL does the following to add support for <iframe>s to slimming paint: 1. The per-RenderView ViewDisplayList has been moved from RenderView to the local root FrameView, so a sub-frame's paint chunks will be appended to appropriate places in the display list. 2. Added TranslationDisplayItem. This display item allows nesting child elements inside a translated context. 3. RenderPart painting code moved to paint/PartPainter. Proper chunk recorder added. 4. Partially implement paint chunks for FrameView barely to pass fast/block layout tests.

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -121 lines) Patch
M Source/core/core.gypi View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/frame/Frame.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/frame/Frame.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/frame/FrameView.h View 3 chunks +12 lines, -0 lines 2 comments Download
M Source/core/paint/ClipRecorder.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/ClipRecorder.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/DrawingRecorder.cpp View 1 chunk +2 lines, -2 lines 2 comments Download
M Source/core/paint/FramePainter.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
A + Source/core/paint/PartPainter.h View 1 chunk +10 lines, -8 lines 2 comments Download
A Source/core/paint/PartPainter.cpp View 1 chunk +130 lines, -0 lines 0 comments Download
A Source/core/paint/TranslationRecorder.h View 1 chunk +46 lines, -0 lines 0 comments Download
A Source/core/paint/TranslationRecorder.cpp View 1 chunk +43 lines, -0 lines 2 comments Download
M Source/core/paint/ViewDisplayList.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/paint/ViewDisplayList.cpp View 2 chunks +28 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderEmbeddedObject.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderEmbeddedObject.cpp View 1 chunk +0 lines, -9 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderPart.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderPart.cpp View 2 chunks +2 lines, -78 lines 0 comments Download
M Source/core/rendering/RenderReplaced.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderView.h View 3 chunks +0 lines, -10 lines 0 comments Download
M Source/core/rendering/compositing/CompositedLayerMapping.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
trchen
Hello, this is a WIP for adding support for <iframe>s to slimming paint. A few ...
6 years, 1 month ago (2014-11-01 00:27:12 UTC) #2
leviw_travelin_and_unemployed
I feel like it would make this easier to review if the PartPainter refactor was ...
6 years, 1 month ago (2014-11-01 00:29:01 UTC) #3
chrishtr
https://codereview.chromium.org/698743002/diff/1/Source/core/frame/FrameView.h File Source/core/frame/FrameView.h (right): https://codereview.chromium.org/698743002/diff/1/Source/core/frame/FrameView.h#newcode521 Source/core/frame/FrameView.h:521: ViewDisplayList& viewDisplayList() Don't inline this. https://codereview.chromium.org/698743002/diff/1/Source/core/paint/DrawingRecorder.cpp File Source/core/paint/DrawingRecorder.cpp (right): ...
6 years, 1 month ago (2014-11-01 23:44:11 UTC) #4
trchen
6 years, 1 month ago (2014-11-02 10:36:46 UTC) #5
https://codereview.chromium.org/698743002/diff/1/Source/core/frame/FrameView.h
File Source/core/frame/FrameView.h (right):

https://codereview.chromium.org/698743002/diff/1/Source/core/frame/FrameView....
Source/core/frame/FrameView.h:521: ViewDisplayList& viewDisplayList()
On 2014/11/01 23:44:10, chrishtr wrote:
> Don't inline this.

Acknowledged.

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/DrawingRec...
File Source/core/paint/DrawingRecorder.cpp (right):

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/DrawingRec...
Source/core/paint/DrawingRecorder.cpp:57:
ViewDisplayList::fromRenderObject(m_renderer).add(drawingItem.release());
On 2014/11/01 23:44:10, chrishtr wrote:
> I hadn't mentioned it yet, but since your CL forces the issue, we should put
the
> DisplayItemList (and rename it to that instead of ViewDisplayList) on
> paintInvalidationContainer->layer()->graphicsLayerBacking(). If we do that
then
> the rest we get for free, e.g. traversing across non-composited vs composited
> iframes, or eventually turning off compositing below the root document
entirely.
> 
> 
> GraphicsLayer will also be the right entry point for sending the DisplayList
to
> cc as we implement the rest of Slimming Paint, and allow us to easily get to
the
> phase 1 launch point of painting existing cc::Layers w/Slimming Paint.

Ah ha, that makes sense. I will revise as you planned.

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/PartPainter.h
File Source/core/paint/PartPainter.h (right):

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/PartPainte...
Source/core/paint/PartPainter.h:14: class PartPainter {
On 2014/11/01 23:44:10, chrishtr wrote:
> Like Levi said, please split off the PartPainter refactor into a separate CL
and
> commit it first.

Acknowledged.

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/Translatio...
File Source/core/paint/TranslationRecorder.cpp (right):

https://codereview.chromium.org/698743002/diff/1/Source/core/paint/Translatio...
Source/core/paint/TranslationRecorder.cpp:13: void
TranslationDisplayItem::replay(GraphicsContext* context)
On 2014/11/01 23:44:11, chrishtr wrote:
> Scale, rotate and translate are just convenience wrappers around setting an
> affine transform (which in turn maps to SkMatrix).
> Let's just have an affine transform display item, and put the convenience
> wrapper API methods on the AffineTransformRecorder.

That makes sense. I was thinking that 2D translation is one important degenerate
case that worth optimizing. (We can implement it without having to save
context.) But I guess we can still use a TransformRecorder to do the recording,
and optimize if we detected the transform was a 2D translation.

Powered by Google App Engine
This is Rietveld 408576698