Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Gwenview Gwenview
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Graphics
  • GwenviewGwenview
  • Merge requests
  • !66

Use a simple QGraphicsPixmapItem for drawing raster images

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Arjen Hiemstra requested to merge work/ahiemstra/pixmapitem into master May 06, 2021
  • Overview 32
  • Commits 5
  • Changes 16

RasterImageView was using a custom implementation that would use two QPixmaps to do double buffered rendering. However, since Qt already renders things double buffered, we are doing duplicate work. So drop that and just use QGraphicsPixmapItem so we rely on Qt to handle optimisations. This removes a lot of error-prone and difficult to follow custom code.

BUG: 271671

Additionally, we can move the background painting to a custom QGraphicsItem which allows us to avoid duplicating the background painting between the different views.

Also cleanup the JPEG version detection code since that broke while I was working on it and there is a better solution now.

Edited May 06, 2021 by Arjen Hiemstra
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: work/ahiemstra/pixmapitem