diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-11-19 05:23:04 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-11-19 05:23:04 +0000 |
| commit | 969361993806dbe679d1065d5a869fbb74163e8e (patch) | |
| tree | 96d9ad847f6f5236719f06a9964d7f4fca1b72dc /src/display/sp-canvas.cpp | |
| parent | Multiple fixes for the objects panel (diff) | |
| download | inkscape-969361993806dbe679d1065d5a869fbb74163e8e.tar.gz inkscape-969361993806dbe679d1065d5a869fbb74163e8e.zip | |
Speedup filtering and panning
Diffstat (limited to 'src/display/sp-canvas.cpp')
| -rw-r--r-- | src/display/sp-canvas.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 88fec767f..4bff9865a 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -2119,8 +2119,9 @@ int SPCanvas::paintRectInternal(PaintRectSetup const *setup, Geom::IntRect const // Find the optimal buffer dimensions int bw = this_rect.width(); int bh = this_rect.height(); + // we dont want to stop the idle process if the area is empty if ((bw < 1) || (bh < 1)) - return 0; + return 1; if (bw * bh < setup->max_pixels) { // We are small enough @@ -2207,7 +2208,10 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1) Geom::IntRect paint_rect(xx0, yy0, xx1, yy1); Geom::OptIntRect area = paint_rect & canvas_rect; - if (!area || area->hasZeroArea()) return false; + // we dont want to stop the idle process if the area is empty + if (!area || area->hasZeroArea()) { + return true; + } paint_rect = *area; PaintRectSetup setup; |
