Bug 990740 - Make eyedropper movement smoother. r=fitzgen

This commit is contained in:
Heather Arthur 2014-04-25 16:50:00 -04:00
parent 5ee9080555
commit 5e016905e8

View File

@ -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();