[SPv175] Avoid no-op save-clip/transform-restore subsequences in cc display list |
|||
Issue description
out/Debug/content_shell "--vmodule=*/paint/*=3,*/graphics/*=3" --enable-slimming-paint-v175 --root-layer-scrolls compositing/iframes/fixed-position-iframe.html
In the display list dumped in the graphics layer trees, there are some no-op operation subsequences like:
{
"method": "save"
},
{
"method": "translate",
"params": {
"dx": 0,
"dy": -1800
}
},
{
"method": "save"
},
{
"method": "clipRect",
"params": {
"rect": {
"left": 0,
"top": 1800,
"right": 919,
"bottom": 2247
},
"SkRegion::Op": "kIntersect_Op",
"softClipEdgeStyle": false
}
},
{
"method": "restore"
},
{
"method": "restore"
},
We should avoid them.
,
Feb 1 2018
,
Feb 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fe4ec3f73d8fe91af94593c52b1fedd6fe396e7e commit fe4ec3f73d8fe91af94593c52b1fedd6fe396e7e Author: Vladimir Levin <vmpstr@chromium.org> Date: Mon Feb 05 22:34:23 2018 [SPv175] Delay translate/clip/effect conversion (to cc display item list). This patch delays the recording of the translate/clip/effect until we are confident that the operations will affect anything meaningful. This eliminates the cases of save/clip/restore for example, since it skips recording these operations. Note that it also adds an early out to BoxPainterBase when we're not painting either image or color (ie transparent). Without the early out the record which is generated has a clip due to scroll adjustment, and it's hard to say with a non-empty record whether it actually draws anything. Specifically from the bug, this eliminates the sequence - save - translate - save - clip rect - restore - restore However, there is another sequence of - save - translate - restore which isn't coming from this code which still remains. R=wangxianzhu@chromium.org, chrishtr@chromium.org Bug: 795017 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Id750ead924deec5d208cc9d52b8bb873d448d3e0 Reviewed-on: https://chromium-review.googlesource.com/900264 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#534513} [modify] https://crrev.com/fe4ec3f73d8fe91af94593c52b1fedd6fe396e7e/third_party/WebKit/Source/core/paint/BoxPainterBase.cpp [modify] https://crrev.com/fe4ec3f73d8fe91af94593c52b1fedd6fe396e7e/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp [modify] https://crrev.com/fe4ec3f73d8fe91af94593c52b1fedd6fe396e7e/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayerTest.cpp
,
Feb 5 2018
I'd say this is largely fixed. If we find more terribly inefficient sequences, we can file more bugs. |
|||
►
Sign in to add a comment |
|||
Comment 1 by wangxianzhu@chromium.org
, Dec 14 2017