]> git.lyx.org Git - features.git/commit
three-stage drawing: add a nodraw stage
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 15 Jul 2017 23:25:03 +0000 (01:25 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Feb 2018 11:29:25 +0000 (12:29 +0100)
commitd222e0f48e17eb838d8320f30f82b4c96b3e496e
tree9fd84b1b37e23e3f9120e1294d0bd1f261b178b5
parent9a1728c70a0e171111864168d5f3ac9cae1ca2b8
three-stage drawing: add a nodraw stage

Normally the two stages of drawing are
1/ compute metrics of insets/rows/paragraphs/mathrow...
2/ draw the elements and cache their positions

Now the three stages are
1/ metrics
2/ nodraw: do not draw the elements, but cache their position
3/ draw the elements (and store again their position; it does not
   seems to hurt performance).

Revive the NullPainter: this replaces the setDrawingEnabled mechanism
with a painter that does nothing. The advantage is that updatePosCache
(renamed from setPosCache) does not need anymore to be invoked from
the frontend.

updatePosCache (the nodraw stage) is called at the end of
BufferView::updateMetrics.
src/BufferView.cpp
src/BufferView.h
src/RowPainter.cpp
src/TextMetrics.cpp
src/frontends/Makefile.am
src/frontends/NullPainter.h [new file with mode: 0644]
src/frontends/Painter.h
src/frontends/qt4/GuiPainter.cpp
src/frontends/qt4/GuiPainter.h
src/frontends/qt4/GuiWorkArea.cpp
src/mathed/InsetMathMacroTemplate.cpp