More updates to painting analysis

This commit is contained in:
Jean-Marc Lasgouttes 2015-10-04 22:28:36 +02:00
parent c4da9b9e37
commit d377e765a2
2 changed files with 20 additions and 10 deletions

View File

@ -40,14 +40,22 @@ a good value? NoScreenUpdate?
On a related note, what is the semantics of a call to On a related note, what is the semantics of a call to
Buffer::changed(false)? What does the caller mean? Buffer::changed(false)? What does the caller mean?
** What happens with FitCursor when the cursor is already OK? ** How to avoid redraw with FitCursor when the cursor is already OK?
In this case, we invoke Buffer::change(false) with drawing disabled, In this case, we invoke Buffer::change(false) with drawing disabled
which means that the paint machinery is invoked to update inset and NoScreenUpdate strategy.
positions.
Actually, this was added as part of the horizontal scrolling GSoC In the draw phase, bv::checkCursorScrollOffset (the horizontal
work. We need to investigate how costly this is. scrolling machinery) will change the strategy to FullScreenUpdate if
the current row needs further scrolling.
When the update strategy it kept to NoScreenUpdate, there is currently
a no-draw full repaint, which should not be necessary. It would be
possible to avoid that if the call to checkCursorScrollOffset was done
in bv::processUpdateFlags instead of bv::draw.
The global idea would be to extend FitCursor to cover also horizontal
cursor.
* Proposals * Proposals
@ -85,7 +93,9 @@ There was a proposal to always compute _all_ rows, but this may become
expensive for large files. This would though help scrolling. expensive for large files. This would though help scrolling.
* Two phase drawing * Description of current drawing mechanism
** Two phase drawing
There are two parts to drawing the work area: There are two parts to drawing the work area:
@ -122,7 +132,7 @@ The screen is drawn (with appropriate update strategy), except when
update flag is Update::None. update flag is Update::None.
* Metrics computation ** Metrics computation
This is triggered by bv::updateMetrics, which calls tm::redoParagraph for This is triggered by bv::updateMetrics, which calls tm::redoParagraph for
+ all visible paragraphs + all visible paragraphs
@ -137,7 +147,7 @@ of text insets, this will invoke recursively tm::metrics, which redoes
all the paragraphs of the inset. all the paragraphs of the inset.
* Drawing the work area. ** Drawing the work area.
This is done in bv::draw. This method is triggered mainly by This is done in bv::draw. This method is triggered mainly by
Buffer::changed, which draws all the work areas that show the given buffer. Buffer::changed, which draws all the work areas that show the given buffer.

View File

@ -471,7 +471,7 @@ void BufferView::processUpdateFlags(Update::flags flags)
return; return;
} }
// no screen update is needed in principle, but this // no screen update is needed in principle, but this
// could change if cursor row needs scrolling. // could change if cursor row needs horizontal scrolling.
d->update_strategy_ = NoScreenUpdate; d->update_strategy_ = NoScreenUpdate;
buffer_.changed(false); buffer_.changed(false);
return; return;