[SPv175+] Reuse transform state across clip/effect states if possible
For:
<div style="transform: translateX(10px)">
<div>A</div>
<div style="overflow: hidden">B</div>
<div>C</div>
</div>
previously we emitted the following paint operations:
Save
Transform
Draw A
Restore
Save
Transform
ClipRect
Draw B
Restore
Save
Transform
Draw C
Restore
With this CL, we emit the following paint operations:
Save
Transform
Draw A
Save
ClipRect
Draw B
Restore
Draw C
Restore
by reusing transform state across clip state which has the same
transform.
CT result: https://ct.skia.org/results/cluster-telemetry/tasks/chromium_perf_runs/wangxianzhu-20180406052047/html/index.html
This CL reduces paint_op_count by 2.6%.
Bug: 803867
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id0d41b98ffd35440f4a608856650f7109362d425
Reviewed-on: https://chromium-review.googlesource.com/999095
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by:
Tien-Ren Chen <trchen@chromium.org>
Reviewed-by:
Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549429}
Showing