[Marble-devel] Review Request 123306: Fixes a tile scaling bug that resulted in low level tiles creating a peculiar mosaic on intensive zooming to non-predownloaded areas.

Adam Dabrowski adabrowski at piap.pl
Tue Apr 14 07:49:53 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123306/
-----------------------------------------------------------

(Updated April 14, 2015, 7:49 a.m.)


Status
------

This change has been marked as submitted.


Review request for Marble.


Changes
-------

Submitted with commit 7c4dcf9e0b384301df29fc062ef29c031eae45d3 by Torsten Rahn on behalf of Adam Dabrowski to branch master.


Repository: marble


Description
-------

Update: Now fixes the issue by bounding the scaled aread to a minimum of 1 pixel 

-----

Doesn't change functionality.

Does clarify the code as flow was very non-intuitive previously (especially in case when deltaLevel > 8 for tileSize = 256).

if/when the scaledLowerLevelTile "for" loop reached zoom level where 2^deltaLevel > tileSize, a peculiar thing was happening.
In this situation, in part "// which rect to scale?", the image was copied first from 0 sized-image. Calling the QImage::copy function with null rectangle (or 0 width and 0 height) results in copying a whole image instead. As a result, instead of level_N tile, a level_N-9 (or later) tile was returned unscaled, resulting in curious displays (i.e. multiple copies of the same tile image).
While for textures that are downloadable this was a temporary case, offline textures would just stop there and display this curious images. Additionally it was very unclear and took me some time to figure out what's happening.

This version does clearly what previously was done due to specific QImage::copy behaviour.

Let's discuss if this behaviour is desired (or we want to display a full white opaque tile or a tile with a loading icon if there are download urls etc.).


Diffs
-----

  src/lib/marble/TileLoader.cpp 01994eb 

Diff: https://git.reviewboard.kde.org/r/123306/diff/


Testing
-------

Tested with unbounded second layer (partial) of texture, where the bug formerly was very easy to detect. Also tested with fast zooming to non-predownloaded areas. Works well. 

Tested with zooming in and out and two layers of texture as well as one. No change noticed (as intended).


Thanks,

Adam Dabrowski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20150414/eb507336/attachment.html>


More information about the Marble-devel mailing list