Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPixel snapping with a stretch #1279
Closed
Labels
Comments
Closed
|
Some relevant tests in gecko:
All of these have a missing column of pixels on the right, because the width on that pixel is 0.5, which the rasterizer happens to decide means that pixel isn't part of the shape. |
|
Also, we need the snapping information (the two corners) to be independent of the rect of the primitive, otherwise tiled primitives often render incorrectly (1 pixel band between two tiles of the same image) because each tile get snapped independently. Or perhaps the stretching will prevent this bug? |
bors-servo
added a commit
that referenced
this issue
May 26, 2017
Full rectangular pixel snapping Fixes #1279 r? @glennw WIP TODOs: - [x] test servo WPT reftests - [x] add local snapping tests - [x] cover `write_transform_vertex` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1292) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
May 26, 2017
Full rectangular pixel snapping Fixes #1279 r? @glennw WIP TODOs: - [x] test servo WPT reftests - [x] add local snapping tests - [x] cover `write_transform_vertex` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1292) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We currently pass a single reference point into the primitive's vertex shader, based on which the snapping offset is computed for the whole primitive. That's not exactly how Gecko/Safari do the snapping. We should be snapping both left and right (correspondingly, top and bottom) of a primitive, potentially even stretching it.