]> git.lyx.org Git - lyx.git/commit
Allow multiple calls to processUpdateFlags before redraw
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 11 Oct 2017 16:00:48 +0000 (18:00 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 16 Oct 2017 09:05:52 +0000 (11:05 +0200)
commitc19c54dd5b85726df1b5187616d17d5430028c16
treee49aa1cebed9b9e77d4ad11e25632ef414b358ea
parent4345331870cb3207dde3930a932c77bebe81dbda
Allow multiple calls to processUpdateFlags before redraw

The goal of this commit is to ensure that a processUpdateFlags call
that requires no redraw will not override a previous one that did
require a redraw.

To this end, the semantics of the flag argument is now different: its
value is now OR'ed with a private update_flags_ variable. This
variable is only reset after the buffer view has actually been
redrawn.

A new Update::ForceRedraw flag has been added. It requires a full
redraw but no metrics computation. It is not used in the main code
(yet), but avoids to compute metrics repeatedly in consecutive
processUpdateFlags calls.

Finally the dubious call to updateMacros in updateMetrics has been
removed for performance reasons.
development/PAINTING_ANALYSIS
src/BufferView.cpp
src/BufferView.h
src/update_flags.h