Skip to content
Commit 2ad00428 authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Chromium LUCI CQ
Browse files

[StyleBuilder] Avoid reading ref-count for copy-on-write

In DataRef::Access, we currently inspect the ref-count to
determine whether or not we need to copy before doing
a write. However, this pattern does not work for Oilpan objects,
since they don't have ref-counts.

This CL replaces the ref-count check with "access flags"
on ComputedStyleBuilder which track whether or not a given
DataRef has been copied yet.

This prepares ComputedStyle (and its various substructures)
for Oilpanification.

Performance (as measured by StyleCalcPerfTest) looks neutral.

Bug: 1377295
Change-Id: Ib1410735d462f2443a4e2a099b3cd7485cd235dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4080498


Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118652}
parent da4b2837
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment