Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement WebGLContext resize #519

Merged
merged 1 commit into from Nov 3, 2016
Merged

Conversation

@MortimerGoro
Copy link
Contributor

MortimerGoro commented Nov 3, 2016

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

This change is Reviewable

@emilio
emilio approved these changes Nov 3, 2016
Copy link
Member

emilio left a comment

this looks good to me, thanks for doing it!

I'd like @glennw to sign-off the device-touching code, if that's possible.

@@ -779,6 +779,13 @@ impl TextureCache {
})
}

pub fn add_raw_remove(&mut self, id: TextureId) {

This comment has been minimized.

Copy link
@emilio

emilio Nov 3, 2016

Member

add_raw_remove sounds a bit weird, though it follows the convention. I can't think of an immediately better name now, so I guess this is ok.

This comment has been minimized.

Copy link
@kvark

kvark Nov 3, 2016

Member

yeah, it does follow the convention. Perhaps, the convention should be revised? as a separate PR

let prev_texture_id = self.webgl_textures.get(&id).unwrap();

// Remove existing cache if texture id has changed
if !prev_texture_id.eq(&texture_id) {

This comment has been minimized.

Copy link
@kvark

kvark Nov 3, 2016

Member

any reason !eq() and clone() are used instead of != and * (since this is Copy)?

This comment has been minimized.

Copy link
@MortimerGoro

MortimerGoro Nov 3, 2016

Author Contributor

I didn't realize that it is Copy;)

@@ -779,6 +779,13 @@ impl TextureCache {
})
}

pub fn add_raw_remove(&mut self, id: TextureId) {

This comment has been minimized.

Copy link
@kvark

kvark Nov 3, 2016

Member

yeah, it does follow the convention. Perhaps, the convention should be revised? as a separate PR

@MortimerGoro MortimerGoro force-pushed the MortimerGoro:webgl_resize branch from 6e4a4a2 to 48f204a Nov 3, 2016
@MortimerGoro MortimerGoro force-pushed the MortimerGoro:webgl_resize branch from 48f204a to d8bcc18 Nov 3, 2016
@glennw
Copy link
Member

glennw commented Nov 3, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 3, 2016

📌 Commit d8bcc18 has been approved by glennw

@bors-servo
Copy link
Contributor

bors-servo commented Nov 3, 2016

Testing commit d8bcc18 with merge 49dfb69...

bors-servo added a commit that referenced this pull request Nov 3, 2016
Implement WebGLContext resize

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

<!-- 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/519)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 3, 2016

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit d8bcc18 into servo:master Nov 3, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@MortimerGoro MortimerGoro mentioned this pull request Nov 4, 2016
3 of 5 tasks complete
bors-servo added a commit to servo/servo that referenced this pull request Nov 5, 2016
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 added a commit to servo/servo that referenced this pull request Nov 9, 2016
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 added a commit to servo/servo that referenced this pull request Nov 28, 2016
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 added a commit to servo/servo that referenced this pull request Dec 1, 2016
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 -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 4, 2017
…o:webgl-resize); r=MortimerGoro

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 94eefc4001e0998fcea5a35943da73624ea82b13
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 1, 2019
…o:webgl-resize); r=MortimerGoro

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 94eefc4001e0998fcea5a35943da73624ea82b13

UltraBlame original commit: fc18c37273eda7200f883473b7409526bb03a592
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
…o:webgl-resize); r=MortimerGoro

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 94eefc4001e0998fcea5a35943da73624ea82b13

UltraBlame original commit: fc18c37273eda7200f883473b7409526bb03a592
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
…o:webgl-resize); r=MortimerGoro

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 94eefc4001e0998fcea5a35943da73624ea82b13

UltraBlame original commit: fc18c37273eda7200f883473b7409526bb03a592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.