Bug 990740 - Make eyedropper movement smoother. r=fitzgen

This commit is contained in:
Heather Arthur 2014-04-25 16:50:00 -04:00
Родитель 8d5596e4bc
Коммит 565a34e98e
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -115,6 +115,8 @@ function Eyedropper(chromeWindow, opts = { copyOnSelect: true }) {
this._dragging = true;
this.loaded = false;
this._mouseMoveCounter = 0;
this.format = Services.prefs.getCharPref(FORMAT_PREF); // color value format
this.zoom = Services.prefs.getIntPref(ZOOM_PREF); // zoom level - integer
@ -378,6 +380,11 @@ Eyedropper.prototype = {
return;
}
if (this._OS == "Linux" && ++this._mouseMoveCounter % 2 == 0) {
// skip every other mousemove to preserve performance.
return;
}
this._setCoordinates(event);
this._drawWindow();