Skip to content

Break up canvas

PBS requested to merge pbs3141/inkscape:canvas-breakup into master

Good riddance, large class!

Reduce canvas.cpp from 4.2 to 2.2 Kloc by splitting it into separate files, and move all such files to ui/widget/canvas/.

  • Cairo and OpenGL backends are now hidden behind a Graphics interface.
  • Store manipulation logic+state is isolated in a Stores class.
  • Utilities are split out into a common header.

This is pure refactoring. It's also in a draft state until I work out the best way to put back block tile dragging. The reason for pushing it now is to help it get merged faster.

Addresses @marcjeanmougin's comment from !4133 (comment 875677751):

I saw many cases where canvas methods would have a big if(opengl)else(cairo), would it make sense to separate the classes for cairo and opengl renderings?

Edited by PBS

Merge request reports