The computation of the repetition depends on the aspect ratio of the segment's uv rectangle, which was previously represented by the dx/dy variables in the shader. These were mistakenly computing the ratio of the normalized uvs within the primitive's total uv rect, which was incorrect since the normalization introduces a non-uniform scale. This patch fixes it by taking the uv size in device pixels instead of the the normalized textel rect. dx and dy are also renamed into segment_uv_size which is a more informative name. Differential Revision: https://phabricator.services.mozilla.com/D60768 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/b77165c764503ccf3b0f52b60fff265d4048ba6e