Closed Bug 990740 Opened 10 years ago Closed 10 years ago

Make eyedropper movement smoother

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: harth, Assigned: harth)

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached 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
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
Attachment #8413050 - Flags: review?(nfitzgerald)
Attachment #8413050 - Flags: review?(nfitzgerald) → review+
Keywords: checkin-needed
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/c376ff82cd3e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
QA Whiteboard: [good first verify]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.