DescriptionAvoid repeatedly deriving fonts in the LabelButton ctor.
Create LazyInstances for the default LabelButton FontLists.
Avoid creating/deriving default fonts for each new button.
(the bookmark bar can create unbounded button instances)
(repeated derivation is slow and exhausts GDI handles)
BUG=411716
TEST=Profiles with tons of bookmarks do not crash.
R=sky@chromium.org
Committed: https://crrev.com/753f06ff55b91b8ff39352e8bf87cbbbd2d695f4
Cr-Commit-Position: refs/heads/master@{#294955}
Patch Set 1 #Patch Set 2 : Set Label FontList in LabelButton ctor. #
Total comments: 2
Patch Set 3 : Use LazyInstance to avoid non-POD statics. #Patch Set 4 : Add bold styling DCHECK warning against repeated derive calls. #Messages
Total messages: 8 (2 generated)
|