[LayoutNG] Make NGBoxFragmentPainter ctor lighter

This patch defers computing |NGBorderEdges| until it's
necessary.

The constructors of painters are very hot, called on every
phase, and |NGBorderEdges| is not necessary for all phases.

It is especially hot when it's painted atomically. SSM
indicates 20% of paint time is consumed to paint atomically.

Also moved |PhysicalFragment()| to top so that it is inline-
able without LTO enabled.

Bug: 936024
Change-Id: I37f8f786ccc303c503d6904ec51b6ce3a954a927
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510701
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639091}
2 files changed