New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 795017 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 771643



Sign in to add a comment

[SPv175] Avoid no-op save-clip/transform-restore subsequences in cc display list

Project Member Reported by wangxianzhu@chromium.org, Dec 14 2017

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.
 
Blocking: 771643
Owner: vmp...@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
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