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 upUse DeviceInt* instead of DeviceUint*. #3291
Conversation
|
Sorry for the antisocial patch. The change is completely mechanical but it ended up touching quite a bit of code and will likely conflict with everything else. As discussed in the gfx daily, the idea is to use signed integers everywhere instead of a mix of signed and unsigned integers for device pixels. This removes an old TODO in the code that was already complaining about the mess of mixing all kinds of scalar types. This will also help avoid the kind of mistakes that got #3272 backed out (intermediate computations potentially using negative values). For reference, gecko uses signed integers for all of its integer point/rect/size types. Also close to the webrender API the gecko side ended up converting all of the signed integers into unsigned ones (in most places somewhat silently "thanks" to C++) so it adds to my motivation of consistently using i32. I'm working on the corresponding gecko patch since this affects the API. |
28190f5
to
0d53439
|
|
|
|
|
Green build-only try push: https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=210593072&revision=d142cdb56ff05159e42748b10a163204ec141a76 There was a prior push that passed the tests on linux but didn't build everywhere before I did the build fixes: https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=210593072&revision=5e79214b6ec27704581198ce0b7d7b2b2feb813e Unfortunately this PR bitrots faster than I can test it on the CI, but since it is only changing tons of |
|
@bors-servo r+ |
|
|
Use DeviceInt* instead of DeviceUint*. We currently use a mix of both which can be untidy at places and is error prone when doing intermediate computations that may go through negative values. <!-- 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/3291) <!-- Reviewable:end -->
|
|
We currently use a mix of both which can be untiddy at places and is error prone when doing intermediate computations that may go through negative values.
|
@bors-servo r+ |
|
|
Use DeviceInt* instead of DeviceUint*. We currently use a mix of both which can be untidy at places and is error prone when doing intermediate computations that may go through negative values. <!-- 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/3291) <!-- Reviewable:end -->
|
|
|
@nical can you put the Gecko side patch (properly formatted please) somewhere that I can pull? |
|
The Gecko patch is up at https://bugzilla.mozilla.org/show_bug.cgi?id=1507140 |
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
Update webrender Fixes #22232 , once servo/webrender#3327 lands and I update this PR to include it All the integer casts are due to servo/webrender#3291 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22237) <!-- Reviewable:end -->
nical commentedNov 9, 2018
•
edited by larsbergstrom
We currently use a mix of both which can be untidy at places and is error prone when doing intermediate computations that may go through negative values.
This change is