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 upImplement WebGLContext resize #14075
Conversation
highfive
commented
Nov 4, 2016
|
Heads up! This PR modifies the following files:
|
|
@bors-servo r+ |
|
|
Implement WebGLContext resize <!-- Please describe your changes on the following line: --> Related PR: servo/webrender#519 Implement WebGLContext resize (canvas.width & canvas.height). I have tested: - Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl") - Support WebGL apps that change the canvas size & viewport on window.onresize --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14075) <!-- Reviewable:end -->
|
|
|
@bors-servo retry Maybe intermittent? |
Implement WebGLContext resize <!-- Please describe your changes on the following line: --> Related PR: servo/webrender#519 Implement WebGLContext resize (canvas.width & canvas.height). I have tested: - Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl") - Support WebGL apps that change the canvas size & viewport on window.onresize --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14075) <!-- Reviewable:end -->
|
The test includes modifiying the canvas width and height, so this should probably be investigated!
|
|
|
|
Yup, seems legit. Seems like we need to zero out the pixels that aren't in the current viewport set by |
|
@emilio After a resize we need to keep the default scissor that offscreen sets initially: https://github.com/emilio/rust-offscreen-rendering-context/blob/44e331217f958737349118969c4e73c96202440f/src/gl_context.rs#L187 I'll push a PR to conform the spec. |
|
@emilio We could do the change in Servo or offscreen-context, some pros an cons:
Let me know what do you think about this. |
|
I guess ideally we'll keep the WebGL-specific logic in Servo. I don't think an extra scissor call will be a perf issue here, but we can always re-consider if needed. |
Implement WebGLContext resize <!-- Please describe your changes on the following line: --> Related PR: servo/webrender#519 Implement WebGLContext resize (canvas.width & canvas.height). I have tested: - Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl") - Support WebGL apps that change the canvas size & viewport on window.onresize --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14075) <!-- Reviewable:end -->
|
|
The only other failure is #14380. |
44a0dff
to
4761e51
|
It should be fixed now. Related PR: servo/surfman#75 Why does AppVeyor say that there is a conflict? I ran "./mach cargo-update -p offscreen_gl_context" after a clean rebase onto the latest master |
|
It seems you need to rebase according to github too... r=me when that's done. @bors-servo delegate+ |
|
|
|
It seems you need to rebase according to github too... r=me when that's done. @bors-servo delegate+ |
|
|
|
@emilio ouch, I did the merge upstream/master but forgot the rebase. Signals that it's time to go to bed ;) |
|
@bors-servo: r+ |
|
|
Implement WebGLContext resize <!-- Please describe your changes on the following line: --> Related PR: servo/webrender#519 Implement WebGLContext resize (canvas.width & canvas.height). I have tested: - Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl") - Support WebGL apps that change the canvas size & viewport on window.onresize --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14075) <!-- Reviewable:end -->
|
|
MortimerGoro commentedNov 4, 2016
•
edited by larsbergstrom
Related PR: servo/webrender#519
Implement WebGLContext resize (canvas.width & canvas.height). I have tested:
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is