https://bugs.kde.org/show_bug.cgi?id=465841

Waqar Ahmed <waqar....@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/fram |https://invent.kde.org/fram
                   |eworks/ktexteditor/commit/0 |eworks/ktexteditor/commit/d
                   |2a76278f9596e35cb99b42065a4 |9593e16f03461965df3e925a6a9
                   |a529b51a1992                |65aaf7b61aa0

--- Comment #15 from Waqar Ahmed <waqar....@gmail.com> ---
Git commit d9593e16f03461965df3e925a6a965aaf7b61aa0 by Waqar Ahmed.
Committed on 02/03/2023 at 18:26.
Pushed by waqar into branch 'kf5'.

Optimize rendering spaces with dyn wrapping

When dynamic wrapping is enabled and a QTextLine has trailing spaces, then
those spaces aren't really shown unless QTextOption::ShowTabsAndSpaces is
enabled. Thus we shouldn't waste time rendering spaces at the same
position.

With this commit, rendering of spaces is split into 3 steps:
1. Collect all spaces in the line by iterating over the text in reverse
2. Iterate over all the collected spaces in reverse because we want to
   look at the spaces in the beginning of line first and convert each
   space position into a QPointF. Whenever we encounter a point which
   was equal to the last collected point, we stop the loop and break.
3. Render all the collected space points at once.
(cherry picked from commit 02a76278f9596e35cb99b42065a4a529b51a1992)

M  +30   -8    src/render/katerenderer.cpp
M  +1    -1    src/render/katerenderer.h

https://invent.kde.org/frameworks/ktexteditor/commit/d9593e16f03461965df3e925a6a965aaf7b61aa0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to