[okular] [Bug 423360] Viewport blinks (flashes, disappears) while scrolling or dragging at moderate or high zoom levels

David Hurka bugzilla_noreply at kde.org
Sun Jul 26 23:32:11 BST 2020


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

--- Comment #2 from David Hurka <david.hurka at mailbox.org> ---
I marked all the pixmaps fetched by PagePainter, to understand how tiling
works.
* A rounded rectangle precisely marks the tile outline.
* Two “measuring tapes” show me that the pixmaps are shown in
  their correct size.
* 8 color swatches in the center show a 24 bit hash of the pixmap
  pointer, so it is easy to see when exactly new pixmaps are created.
* A red and a cyan 3px square are placed exactly in the NW and SE
  corners, so I can exactly see how PagePainter positions the tiles.
  If the tiles are misaligned, these squares are cut
  from [] to [ or to | or even disappear.
  (It is visible that TileManager stores 1px overlapping tiles, at
  least at 131.25% hiDPI screen scale.)
* The exact pixmap size is shown.
Code is available at https://invent.kde.org/davidhurka/okular in branch
tests_pagepainter-paint-pixmap-tree.

This gave me an opportunity to record a detailed video of the flashing
viewport. The video is linked below, it’s about 7 minutes long. Well, here is a
transcript:

0:00: Small zoom factor, tiling not used.
      The document is rotated, because then the tiling performance is
      apparently lower, so the artifacts are easier to record on video.
      The document is https://20years.kde.org/book/#download .

PHASE 1: View without tiling, no flashing.

0:00: Mouse drag, pixmaps stay the same.
0:23: Arrow/Page key scrolling, pixmaps stay the same.
0:36: Selection scrolling, pixmaps stay the same.
0:57: Discrete zooming, resize Thumbnail bar.
      New pixmaps are generated (only for the PageView document observer).
1:10: Zoom in until tiling is used.
1:15: Trackpoint scrolling. Viewport blinks.

PHASE 2: View with tiling, much flashing.

1:30: Reached a page where tiling is always used.
      Fast and slow scrolling, shows that pixmaps are updated
      at slow scrolling, and some of them disappear only at fast
      scrolling. Scrolling with mouse drag and trackpoint.
2:25: Arrow key scrolling. Pixmaps are updated after scrolling stops.
3:23: Page key scrolling. Same behavior as with arrow keys.
4:05: Selection scrolling. Same behavior as with arrow keys.
4:53: Shift + Arrow Up automatic scrolling. Pixmaps are updated irregularily.
5:17: Additional trackpoint scrolling. Similar behavior.

PHASE 3: Tile alignment/overlap at 131.25% hiDPI:

5:36: Focus at a tile intersection. The overlap is visible.
      The red/cyan 3px squares should touch corner-corner, but their
      corners overlap by 1 or 2 px. You can see the red square
      alternating between ] and | shape, instead of [].

6:48: Resize Thumbnail bar. PageView tiles disappear.

PHASE 4: Rotation:

7:05: Rotate to original orientation. At original orientation the
      tiles disappear much less frequent.
7:30: Rotating at small zoom factor, no tiling used. Rotating
      from original orientation rotates the existing pixmaps,
      rotating to original orientation creates new pixmaps.

Conclusions:
* It appears that PageView communicates incorrect viewport updates, which
confuses the TileManagers. I couldn’t record it in the video, but sometimes it
appears that flashes and pixmap updates happen exactly when the viewport in the
Thumbnails bar is updated. I suspect that this is a regression from the
QScroller patch. More testing is needed with v19.12.3.
* Tiles slightly overlap. The issue is that the overlap alternates between 1px
and 2px. That is probably caused by rounding errors. It’s not a big issue, and
98% not linked to this bug report.

https://cloudstorage.uni-oldenburg.de/s/CKW6nN9kW8oWbg4

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list