Closed
Bug 507939
Opened 15 years ago
Closed 15 years ago
Areas not painted when scrolling radial gradient
Categories
(Core :: Layout, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: roc, Assigned: roc)
References
Details
(Keywords: verified1.9.2)
Attachments
(3 files)
Scrolling the attached testcase on Mac, I see that some parts of the gradient aren't repainted.
Michael, can you reproduce this on Linux?
Assignee | ||
Comment 1•15 years ago
|
||
If we can't reproduce this on Linux or Windows, I'm calling this a Cairo/Quartz bug.
Comment 2•15 years ago
|
||
Fwiw, I see this on OS X, but not on Ubuntu904 running in a VM
Comment 3•15 years ago
|
||
WFM on Ubuntu 9.04.
Comment 5•15 years ago
|
||
Could not reproduce on Windows.
Assignee | ||
Comment 6•15 years ago
|
||
Click on "Redraw". Every single time the element becomes visible, a small band at the bottom of the element is not painted. It only happens with repeating radial gradients --- not linear gradients, not non-repeating radial gradients. It's something to do with the dirty area though, since if you force repainting of the whole window, it paints OK. So I suspect a cairo/quartz bug with repeating radial gradients being clipped.
Assignee: nobody → roc
Assignee | ||
Comment 7•15 years ago
|
||
Hmm, but we actually fall back to pixman for repeating radial gradients:
http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-quartz-surface.c#1169
I don't understand why we have to, but anyway, it seems this bug must be in cairo somewhere.
Assignee | ||
Comment 8•15 years ago
|
||
We seem to be consistently chopping 18 rows off the bottom of the rendered gradient.
There must be something wrong in the fallback path; _cairo_quartz_setup_fallback_source is only used for repeating radial gradients. However, the image data looks correct to me before it goes into _cairo_surface_to_cgimage, the extra lines are all there. I'm stumped for now.
Assignee | ||
Comment 9•15 years ago
|
||
Hmm. The 18 is the height of the title bar. I think the problem is here:
// get the Y flip right -- the CTM will always have a Y flip in place
clipBox.origin.y = surface->extents.height - (clipBox.origin.y + clipBox.size.height);
Here (in a modified testcase) clipBox starts at x=0,y=0,width=200,height=200. The CTM (inverse) is a=1,b=0,c=0,d=-1,tx=0,ty=612. surface->extents is x=0,y=0,width=1038,height=594. So we compute a clipBox of x=0,y=-18,width=200,height=200.
I'm still not 100% sure what's going on here but clearly surface->extents being different from the 612 in the CTM is a problem.
Assignee | ||
Comment 10•15 years ago
|
||
Actually, 18 is the height of the status bar.
Assignee | ||
Comment 11•15 years ago
|
||
This fixes it.
The CTM we keep in our CGContext is always a mapping from cairo "device space" to CGContext's native space (i.e., a flip). The comment "// the clipBox is in userspace, so:" is misleading; it's actually already in cairo device space, so we shouldn't be doing anything at all with it here.
I also happened to notice that in _cairo_quartz_surface_paint with action DO_SHADING we aren't saving and restoring the CGContext state properly.
Unfortunately we can't really test this; I think drawing to a canvas won't exercise the problem here.
Attachment #392459 -
Flags: review?(vladimir)
Assignee | ||
Comment 12•15 years ago
|
||
I filed bug 508227 on avoiding fallback for repeated radial gradients. I think there will be degenerate cases where we still have to fall back, though.
Flags: blocking1.9.2?
Whiteboard: [needs review]
Assignee | ||
Updated•15 years ago
|
Attachment #392459 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 13•15 years ago
|
||
Comment on attachment 392459 [details] [diff] [review]
fix
Maybe Jeff can review this if he gets to it first?
Assignee | ||
Updated•15 years ago
|
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Assignee | ||
Comment 14•15 years ago
|
||
Guys, we really need review here. We're not really able to talk about our gradient support until it's not completely broken on Mac.
Comment 15•15 years ago
|
||
Comment on attachment 392459 [details] [diff] [review]
fix
Vlad said that he thought that some of this code might be for 10.4 but he couldn't remember anything. He didn't put a comment in, so we agreed to delete it. As long as we pass tests this looks fine to me.
Attachment #392459 -
Flags: review?(jmuizelaar) → review+
Comment 16•15 years ago
|
||
I tested this on 10.4, it works.
Landed: http://hg.mozilla.org/mozilla-central/rev/cc6bebbd93bb
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla1.9.3
Comment 17•15 years ago
|
||
Does this need to be added to a list of local patches we have to cairo? And does it need to be moved upstream?
Assignee | ||
Comment 18•15 years ago
|
||
Yes and yes.
Assignee | ||
Comment 19•15 years ago
|
||
We also need to get this on branch...
Updated•15 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing on 1.9.2]
Updated•15 years ago
|
Target Milestone: mozilla1.9.3 → mozilla1.9.3a1
Assignee | ||
Updated•15 years ago
|
Attachment #392459 -
Flags: review?(vladimir) → approval1.9.2?
Comment 20•15 years ago
|
||
Updated•15 years ago
|
Attachment #392459 -
Flags: approval1.9.2?
Comment 21•15 years ago
|
||
verified with: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2a2pre) Gecko/20090911 Namoroka/3.6a2pre
Probably should this to litmus FFT
Flags: in-litmus?
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•