Make eyedropper movement smoother

RESOLVED FIXED in Firefox 31

Status

defect
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: harth, Assigned: harth)

Tracking

unspecified
Firefox 31

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

5 years ago
On Linux especially (tried on Ubuntu), the eyedropper doesn't move smoothly as you move the mouse around. This is because of the code that's being called on each mouse move. The code has a few steps: drawing the area of the window to the panel, drawing a grid over it, extracting the center pixel color and displaying that.

Two areas with potential room for improvement on Linux are the call to getImageData() to get the color of the center pixel, and the call to draw a grid on the canvas, which could be replaced by an overlayed grid image.

Another option if we can't optimize is to just ignore every other mousemove event. I don't know the implications of that, but it's worth looking into.
Assignee

Comment 1

5 years ago
Posted patch Skip every other mouse move (obsolete) — Splinter Review
Here's a patch that will ignore every other mouse move. It makes it less smooth on my OS X (so we wouldn't do it on that), but I suspect it might alleviate the jumping around on Linux.
Assignee: nobody → fayearthur
Assignee

Comment 2

5 years ago
Just tried this out on Linux, and it's much better with this. This will check for Linux, but we already have to do this elsewhere in the eyedropper.
Attachment #8412790 - Attachment is obsolete: true
Assignee

Updated

5 years ago
Attachment #8413050 - Flags: review?(nfitzgerald)
Attachment #8413050 - Flags: review?(nfitzgerald) → review+
Assignee

Updated

5 years ago
Keywords: checkin-needed

Updated

5 years ago
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/c376ff82cd3e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
QA Whiteboard: [good first verify]

Updated

Last year
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.