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

Port aligned, angle and radial gradients to GPU cache. #1328

Merged
merged 3 commits into from
Jun 2, 2017

Conversation

glennw
Copy link
Member

@glennw glennw commented Jun 2, 2017

Also remove the gpu64 data texture, as it's now unused.


This change is Reviewable

Also remove the gpu64 data texture, as it's now unused.
@glennw
Copy link
Member Author

glennw commented Jun 2, 2017

r? @kvark

@glennw
Copy link
Member Author

glennw commented Jun 2, 2017

Pushed a couple of follow up commits on to this PR - port the text run primitive, and remove the temporary GpuLocation enum.

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need some sort of a verification mechanism to ensure the number of GPU blocks read by the shader is the same as our Rust code writes

@@ -314,20 +287,13 @@ pub struct GradientPrimitiveCpu {
pub cache_dirty: bool,
pub gpu_data_address: GpuStoreAddress,
pub gpu_data_count: i32,
pub gpu_blocks: [GpuBlockData; 3],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a bit inconsistent that some stuff composes GpuBlockData on demand while other just keeps gpu_blocks locally. If the semantics of XxxPrimitiveCpu is supposed to allow easy property manipulation, we should compose GpuBlockData on the fly (in write_gpu_blocks) for everything. If it's not supposed to be manipulated, then we can have local [GpuBlockData] members, and we can replace the write_gpu_blocks(&self, &mut Vec<>) into get_gpu_blocks(&self) -> &[].

unreachable!("Encountered a type not supported by GPU cache!");
}
// TODO(gw): Restructure this code so the borrow checker
// doesn't force the locals below!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my, this is getting out of hand!
One option, perhaps the most idiomatic one, would be to have a custom iterator returned by request_iter(), so that we can iterate it without a closure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented in #1336

@kvark
Copy link
Member

kvark commented Jun 2, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 8ab8e37 has been approved by kvark

@bors-servo
Copy link
Contributor

⌛ Testing commit 8ab8e37 with merge f7179d3...

bors-servo pushed a commit that referenced this pull request Jun 2, 2017
Port aligned, angle and radial gradients to GPU cache.

Also remove the gpu64 data texture, as it's now unused.

<!-- 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/1328)
<!-- Reviewable:end -->
@kvark kvark mentioned this pull request Jun 2, 2017
@bors-servo
Copy link
Contributor

💔 Test failed - status-travis

@kvark
Copy link
Member

kvark commented Jun 2, 2017

@bors-servo retry

@bors-servo
Copy link
Contributor

⌛ Testing commit 8ab8e37 with merge e652b78...

bors-servo pushed a commit that referenced this pull request Jun 2, 2017
Port aligned, angle and radial gradients to GPU cache.

Also remove the gpu64 data texture, as it's now unused.

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

☀️ Test successful - status-travis
Approved by: kvark
Pushing e652b78 to master...

@bors-servo bors-servo merged commit 8ab8e37 into servo:master Jun 2, 2017
bors-servo pushed a commit that referenced this pull request Jun 2, 2017
GpuDataRequest

based on #1328
addresses soundness of requests, refactors the usage in prim_store
r? @glennw

<!-- 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/1336)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants