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

Reduce the amount of EGL buffer swapping the ML port is doing #22044

Merged

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Oct 29, 2018

At the moment, we're swapping the EGL buffers every heartbeat, which produces a lot of flickering. We should only swap the buffers when needed.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because we have no way to test on ML

This change is Reviewable

@highfive
Copy link

highfive commented Oct 29, 2018

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@asajeffrey
Copy link
Member Author

asajeffrey commented Oct 29, 2018

@highfive highfive assigned paulrouget and unassigned nox Oct 29, 2018
}

fn prepare_for_composite(&self, _w: Length<u32, DevicePixel>, _h: Length<u32, DevicePixel>) -> bool {
MakeCurrent(self.disp, self.surf, self.surf, self.ctxt);
self.gl.viewport(0, 0, self.width as i32, self.height as i32);

This comment has been minimized.

@jdm

jdm Oct 29, 2018

Member

Shouldn't this be using the w and h arguments instead?

This comment has been minimized.

@asajeffrey

asajeffrey Oct 29, 2018

Author Member

Don't know. On sample runs they agree, except on the very first call where _w and _h are zero. I think the GL viewport has to agree with the viewport reported by get_coordinates() which uses self.x and self.y.

This comment has been minimized.

@paulrouget

paulrouget Oct 30, 2018

Contributor

The very first call is just to make sure we call make_current early: #16903 - but we could call prepare_for_composite with the right coordinates though. At that point, we have access to the size of the viewport:

let coordinates = window.get_coordinates();

Edit: Submitted a PR to remove the parameters #22048

@paulrouget
Copy link
Contributor

paulrouget commented Oct 30, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

📌 Commit 0124baa has been approved by paulrouget

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

Testing commit 0124baa with merge 8aeed87...

bors-servo added a commit that referenced this pull request Oct 30, 2018
… r=paulrouget

Reduce the amount of EGL buffer swapping the ML port is doing

<!-- Please describe your changes on the following line: -->

At the moment, we're swapping the EGL buffers every heartbeat, which produces a lot of flickering. We should only swap the buffers when needed.

---
<!-- 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
- [X] These changes do not require tests because we have no way to test on ML

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

bors-servo commented Oct 30, 2018

💔 Test failed - linux-rel-css

@jdm
Copy link
Member

jdm commented Oct 30, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: #22047
@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

📌 Commit 0124baa has been approved by jdm

@highfive highfive assigned jdm and unassigned paulrouget Oct 30, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

Testing commit 0124baa with merge 9d71696...

bors-servo added a commit that referenced this pull request Oct 30, 2018
… r=jdm

Reduce the amount of EGL buffer swapping the ML port is doing

<!-- Please describe your changes on the following line: -->

At the moment, we're swapping the EGL buffers every heartbeat, which produces a lot of flickering. We should only swap the buffers when needed.

---
<!-- 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
- [X] These changes do not require tests because we have no way to test on ML

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

bors-servo commented Oct 30, 2018

💔 Test failed - linux-rel-css

@jdm
Copy link
Member

jdm commented Oct 30, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

Testing commit 0124baa with merge 290d6b6...

bors-servo added a commit that referenced this pull request Oct 30, 2018
… r=jdm

Reduce the amount of EGL buffer swapping the ML port is doing

<!-- Please describe your changes on the following line: -->

At the moment, we're swapping the EGL buffers every heartbeat, which produces a lot of flickering. We should only swap the buffers when needed.

---
<!-- 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
- [X] These changes do not require tests because we have no way to test on ML

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

bors-servo commented Oct 30, 2018

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member

jdm commented Oct 30, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Oct 30, 2018

Testing commit 0124baa with merge 4ead817...

bors-servo added a commit that referenced this pull request Oct 30, 2018
… r=jdm

Reduce the amount of EGL buffer swapping the ML port is doing

<!-- Please describe your changes on the following line: -->

At the moment, we're swapping the EGL buffers every heartbeat, which produces a lot of flickering. We should only swap the buffers when needed.

---
<!-- 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
- [X] These changes do not require tests because we have no way to test on ML

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/22044)
<!-- Reviewable:end -->
@bors-servo bors-servo merged commit 0124baa into servo:master Oct 30, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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

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