]> 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>
Tue, 29 Aug 2017 14:37:07 +0000 (16:37 +0200)
commitefc735901523752a26440b2d3da390d1c787bc56
treedd020525de6a5e9949e5120a62f9335a86338e0a
parent48f099d93ab179eef76594ced6b735aa912c03f6
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