Closed Bug 996093 Opened 6 years ago Closed 6 years ago
Eyedropper canvas shifts by several pixels on drawing
This something I never encountered when testing the eyedropper before, but exists now after the eyedropper landed. So, some possibility of a platform bug between 2014-04-07 and 2014-04-11? If you open the Eyedropper and move it around the page, you'll notice that the canvas (displaying the pixel grid) is shifted up and to the left by maybe 7px. When it comes to rest it shifts back into place.
Here's what it looks like when you're moving the mouse.
I did an hg bisect reapplying the patch from bug 939040. The first bad revision is: changeset: 178055:16803b53b8a5 user: Chris Lord <firstname.lastname@example.org> date: Fri Apr 11 13:23:09 2014 +0100 files: gfx/layers/basic/BasicCompositor.cpp gfx/layers/basic/BasicLayersImpl.cpp gfx/layers/basic/BasicLayersImpl.h description: Bug 993475 - Consolidate masking code in BasicCompositor and BasicLayersImpl. r=mattwoodrow
STR: 1) Tools > Web Developer > Eyedropper 2) Move mouse around page Observe the canvas of the eyedropper being shifted to the top and left, leaving transparent holes around the border. When you've stopped the mouse, it shifts back into place after a second or two. The element in question is a canvas with a 3px border. The canvas gets shifted but the border stays put. This problem doesn't occur when I remove the border-radius from the canvas, unfortunately I need that to make the eyedropper a circle.
Summary: Eyedropper shifts off center by several pixel on mousemove → Eyedropper canvas shifts off-center by several pixels on mousemove
Component: Developer Tools: Inspector → Graphics: Layers
Product: Firefox → Core
Chris, do you know why your change would cause this bug or how we could fix it?
One thing that might be something, the only reports of this so far are on Retinas.
Another fact, this shifting occurs when drawing to the canvas. If I take the drawing out (drawWindow and drawImage as well as drawing the grid), there is no shifting.
Summary: Eyedropper canvas shifts off-center by several pixels on mousemove → Eyedropper canvas shifts by several pixels on drawing
I guess I must have made some mistake in the consolidation patch - if you unapply https://bugzilla.mozilla.org/attachment.cgi?id=8404849 (16803b53b8a5 in tree), does this fix your issue? If so, then I need to more carefully go over that patch (looking now, I don't see anything obviously wrong)
Flags: needinfo?(chrislord.net) → needinfo?(fayearthur)
It looks like before the patch we did 'transform *= inverseMask;' in FillRectWithMask (i.e. apply the inverse mask transform *after* the old dt transform). With the patch we do 'Matrix transform = inverseMask * oldTransform;', apply the inverse mask transform *before* the old dt transform.
(In reply to Matt Woodrow (:mattwoodrow) from comment #8) > It looks like before the patch we did 'transform *= inverseMask;' in > FillRectWithMask (i.e. apply the inverse mask transform *after* the old dt > transform). > > With the patch we do 'Matrix transform = inverseMask * oldTransform;', apply > the inverse mask transform *before* the old dt transform. This is why I hate operator overloading (amongst many, many other reasons). This will be fixed by your patch in bug 1013769 in that case? If not, care to add the fix there?
Looks like I already fixed this in bug bug 994282.
Works on the original laptop and Linux (where I found it too).
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Assignee: nobody → matt.woodrow
Resolution: WORKSFORME → DUPLICATE
Duplicate of bug: 994282
You need to log in before you can comment on or make changes to this bug.