Descriptioncc: Do not create separate tilings for almost equal scale factors.
Different scale factors which are almost equal (i.e. differ by some
threshold magnitude of floating point epsilon) create different
tilings when content is rigourously zoomed.
e.g. If scales are 7.33907556533813f and 7.33907508850098f, different
tilings get created, when scale is changed from one to other. Although
tiles are shared between different tilings, the contents at previous
scale needs to be re-rastered with new scale. This causes unnecessary
performance hit.
The new function added converts the scale factor with given floating
point to fixed precision floating point. This makes above two scale
factors considered as equal. The above two scales will get converted
as given below, when precision is set as 4.
7.33907556533813 -> 7.339000225067138671875
7.33907508850098 -> 7.339000225067138671875
BUG=327166
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Patch Set 1 #Patch Set 2 : Removed #if #Patch Set 3 : #
Total comments: 2
Patch Set 4 : Addressed few review comments. #
Total comments: 2
Patch Set 5 : Added unit test. #Patch Set 6 : Removed unrelated changes. #
Total comments: 3
Patch Set 7 : Review comments. #Patch Set 8 : Updated unit test. #Patch Set 9 : Small nit. #Patch Set 10 : Made comment more readable. #Patch Set 11 : nit. #
Total comments: 8
Patch Set 12 : Review comments + algorithm modified. #
Total comments: 2
Patch Set 13 : moved roundto function to ideal scales. #
Total comments: 1
Depends on Patchset: Messages
Total messages: 19 (2 generated)
|