Closed Bug 1360414 Opened 3 years ago Closed 3 years ago

Position gradients using FindFirstTile

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

The origin of a tiled gradient needs to be positioned less than the origin of its clip bounds, otherwise it won't fill all of its clip bounds. There is an existing function used by the current code path that can be used to do this.
Attachment #8862701 - Flags: review?(jmuizelaar)
Comment on attachment 8862701 [details] [diff] [review]
gradient-pos.patch

Review of attachment 8862701 [details] [diff] [review]:
-----------------------------------------------------------------

This looks a lot like ethlin's patch in bug 1360112. Possibility of code reuse?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1)
> Comment on attachment 8862701 [details] [diff] [review]
> gradient-pos.patch
> 
> Review of attachment 8862701 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> This looks a lot like ethlin's patch in bug 1360112. Possibility of code
> reuse?

Hm, yeah it does look like we're calculating similar things, in different places. I don't have a strong opinion, this was just using a function local to nsCSSRenderingGradients.cpp used in the other code path.
Ok. I don't have a strong opinion either, this is fine for now.
I'd be interested in seeing if we can unify some of the calculations we have to do. Maybe when the dust settles a bit more.
Attachment #8862701 - Flags: review?(jmuizelaar) → review+
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/projects/graphics/rev/9bfbae06d8e2
Position webrender gradient bounds using FindFirstTile r=jrmuizel
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.