[webkit-changes] [WebKit/WebKit] 9ad6a1: Migrate from LineBreakIteratorPool to TextBreakIte...

Myles C. Maxfield noreply at github.com
Fri Jun 2 01:46:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ad6a13de3e52c7b45ff4af2d68819ef64facf1c
      https://github.com/WebKit/WebKit/commit/9ad6a13de3e52c7b45ff4af2d68819ef64facf1c
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

  Changed paths:
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    R Source/WTF/wtf/text/LineBreakIteratorPoolICU.cpp
    R Source/WTF/wtf/text/LineBreakIteratorPoolICU.h
    M Source/WTF/wtf/text/TextBreakIterator.cpp
    M Source/WTF/wtf/text/TextBreakIterator.h
    M Source/WTF/wtf/text/icu/TextBreakIteratorICU.h
    M Source/WebCore/rendering/BreakLines.h

  Log Message:
  -----------
  Migrate from LineBreakIteratorPool to TextBreakIteratorCache
https://bugs.webkit.org/show_bug.cgi?id=257590
rdar://110097890

Reviewed by Yusuke Suzuki.

We have two different classes which do the same thing. I've been working
on deduplicating them, and this is the last step.

Microbenchmarks say there isn't a performance difference - presumably
because we're still using ICU to do line breaking. We're just using a
different intermediate class to get there. (And if the microbenchmarks
say there isn't a performance difference, then normal benchmarks certainly
won't say that there's a performance difference.)

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.cpp: Removed.
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.h: Removed.
* Source/WTF/wtf/text/TextBreakIterator.cpp:
(WTF::acquireLineBreakIterator): Deleted.
(WTF::releaseLineBreakIterator): Deleted.
(WTF::openLineBreakIterator): Deleted.
(WTF::closeLineBreakIterator): Deleted.
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::CachedTextBreakIterator::~CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::operator=):
(WTF::CachedTextBreakIterator::preceding const):
(WTF::CachedTextBreakIterator::following const):
(WTF::CachedTextBreakIterator::isBoundary const):
(WTF::LazyLineBreakIterator::get):
(WTF::LazyLineBreakIterator::resetStringAndReleaseIterator):
(WTF::LazyLineBreakIterator::~LazyLineBreakIterator): Deleted.
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
* Source/WebCore/rendering/BreakLines.h:
(WebCore::nextBreakablePosition):

Canonical link: https://commits.webkit.org/264825@main




More information about the webkit-changes mailing list