diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2016-04-27 14:27:53 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2016-04-27 14:27:53 -0300 |
commit | 0c2eaee51fbaa734a72e5c4d2cf62881e7c45991 (patch) | |
tree | 3efab3d9b503931bcc66c16ac397a8167ef91a62 /dw/fltkviewbase.cc | |
parent | 08fd62b0bf3bd21b1fc6f27bc3b1ceea1b57f773 (diff) |
Reduce in half the redraws when scrolling.
Now there's a single fl_scroll() call for each scroll operation,
instead of calling fl_scroll() and then draw().
The patch also fixes support for FL_DAMAGE_EXPOSE in FltkViewport::draw().
Test data:
FL_DAMAGE_CHILD = 0x01, 1
FL_DAMAGE_EXPOSE = 0x02, 2
FL_DAMAGE_SCROLL = 0x04, 4
FL_DAMAGE_OVERLAY = 0x08, 8
FL_DAMAGE_USER1 = 0x10, 16
FL_DAMAGE_USER2 = 0x20, 32
FL_DAMAGE_ALL = 0x80 128
-----------------------------------------------------------------------------.
| scroll: keys | focus click | Alt-Tab | unfocus|
| or mousewheel | viewport | statusbar | unfocus | focus | click |
-----------------------------------------------------------------------------|
d4235 | 5,5 | 16 | | 128 |128,128,128| |
d4529 | 5,5 | 16 | | 128 |128,128,128| |
dpatch | 5 | 16 | | 128 |128,128,128| |
-----------------------------------------------------------------------------'
</pre>
The first column means dillo version (hg rev). The second one
the FLTK damage bits received by FltkViewport::draw() per scroll
operation (also viewable at dillo's stdout).
The other columns show excessive calls, but that's another bug
that is not as relevant as scrolling now, so feel free to ignore
them by now.
Diffstat (limited to 'dw/fltkviewbase.cc')
-rw-r--r-- | dw/fltkviewbase.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 4778cd87..145d4136 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -434,7 +434,7 @@ void FltkViewBase::finishDrawing (core::Rectangle *area) void FltkViewBase::queueDraw (core::Rectangle *area) { drawRegion.addRectangle (area); - damage (FL_DAMAGE_USER1); + damage (FL_DAMAGE_USER1); // USER1 for buffered draw } void FltkViewBase::queueDrawTotal () |