Fix Ruler Performance Problem under High Zoom Level (Bug 390041)
ClosedPublic

Authored by mzhou on Feb 16 2018, 9:44 AM.

Details

Summary

The ruler used to draw the marks no matter if they are visible. This causes a performance problem as under high zoom levels, a large number (equals to or more than the number of pixels along the width or height of the canvas) of marks will be drawn. This patch changes the behavior, let the ruler draw only the marks that are visible or partially visible.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mzhou created this revision.Feb 16 2018, 9:44 AM
Restricted Application added a subscriber: woltherav. · View Herald TranscriptFeb 16 2018, 9:44 AM
mzhou requested review of this revision.Feb 16 2018, 9:44 AM
alvinhochun accepted this revision.Feb 17 2018, 5:28 PM
alvinhochun added a subscriber: alvinhochun.

LGTM! I'll push this for you.

This revision is now accepted and ready to land.Feb 17 2018, 5:28 PM
This revision was automatically updated to reflect the committed changes.