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

Store tile dirty rects in tile space. #3272

Merged
merged 1 commit into from Nov 7, 2018
Merged

Conversation

@nical
Copy link
Collaborator

nical commented Nov 5, 2018

Before this PR each tile stores its own dirty rect relative to the entire image. This is somewhat confusing because this field is used to track partial uploads correctly and uploads reason about dirty rects relative to the tiles so it has to do some conversions. Storing relative to the tile is also truer to the "device space" the rects are tagged with.
Last but not least the image-relative coordinates will make even less sense for tiled blob images as we start treating them as virtually infinite planes.


This change is Reviewable

Before this PR each tile stores its own dirty rect relative to the entire image. This is somewhat confusing because this field is used to track partial uploads correctly and uploads reason about dirty rects relative to the tiles so it has to do some conversions. Storing relative to the tile is also truer to the "device space" the rects are tagged with.
Last but not least the image-relative coordinates will make even less sense for tiled blob images as we start trating them as virtually infinite planes.
@nical
Copy link
Collaborator Author

nical commented Nov 6, 2018

try looks good, r? anyone

@Gankra
Gankra approved these changes Nov 6, 2018
// It is important to never assume an empty dirty rect implies a full reupload here,
// although we are able to do so elsewhere. We store the descriptor's full rect instead
// It is important to never assume a dirty rect equal to None implies a full reupload here,
// although we are able to do so elsewhere. We store the image or tile's full rect instead
// There are update sequences which could cause us to forget the correct dirty regions
// regions if we cleared the dirty rect when we received None, e.g.:
// 1) Update with no dirty rect. We want to reupload everything.
// 2) Update with dirty rect B. We still want to reupload everything, not just B.
// 3) Perform the upload some time later.

This comment has been minimized.

Copy link
@Gankra

Gankra Nov 6, 2018

Contributor

These docs feel super off now?

@Gankra
Copy link
Contributor

Gankra commented Nov 6, 2018

r=me with docs updated

@Gankra
Copy link
Contributor

Gankra commented Nov 6, 2018

Ah, I see you delete the commented code in #3277 so should be fine..?

@nical
Copy link
Collaborator Author

nical commented Nov 7, 2018

@bors-servo r=Gankro

@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2018

📌 Commit 87f3eb7 has been approved by Gankro

@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2018

Testing commit 87f3eb7 with merge d1091e4...

bors-servo added a commit that referenced this pull request Nov 7, 2018
Store tile dirty rects in tile space.

Before this PR each tile stores its own dirty rect relative to the entire image. This is somewhat confusing because this field is used to track partial uploads correctly and uploads reason about dirty rects relative to the tiles so it has to do some conversions. Storing relative to the tile is also truer to the "device space" the rects are tagged with.
Last but not least the image-relative coordinates will make even less sense for tiled blob images as we start treating them as virtually infinite planes.

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

bors-servo commented Nov 7, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: Gankro
Pushing d1091e4 to master...

@bors-servo bors-servo merged commit 87f3eb7 into servo:master Nov 7, 2018
2 of 3 checks passed
2 of 3 checks passed
Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Nov 7, 2018
Revert "Store tile dirty rects in tile space."

Reverts #3272. It had a green try but the rebase apparently didn't go well as the webrender update is on fire.

<!-- 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/3284)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 7, 2018
Revert "Store tile dirty rects in tile space."

Reverts #3272. It had a green try but the rebase apparently didn't go well as the webrender update is on fire.

<!-- 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/3284)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Nov 23, 2018
Introduce the DirtyRect type

This is Alexis' [DirtyRect patch](https://phabricator.services.mozilla.com/D9559) completed and rebased on top of #3272.

It turns `Option<Rect>` into an explicit type which is a lot easier to understand as `None` previously meant different things in different areas of the code.

<!-- 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/3277)
<!-- Reviewable:end -->
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

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