Page MenuHomePhabricator

Bug 1606771 - Fix border image repetition computation. r=gw
ClosedPublic

Authored by nical on Jan 22 2020, 11:19 PM.

Details

Summary

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.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nical created this revision.Jan 22 2020, 11:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2020, 11:19 PM
phab-bot requested review of this revision.Jan 22 2020, 11:19 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
nical updated this revision to Diff 221267.Jan 22 2020, 11:21 PM

Revision updated.

nical edited the summary of this revision. (Show Details)Jan 22 2020, 11:21 PM
gw accepted this revision.Jan 23 2020, 3:11 AM

Can we add a wrench reftest for these case(s)?

This revision is now accepted and ready to land.Jan 23 2020, 3:11 AM
nical updated this revision to Diff 221550.Jan 23 2020, 2:21 PM

Revision updated.