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

@kvark
kvark approved these changes Jun 2, 2017
Copy link
Member

kvark left a comment

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],

This comment has been minimized.

@kvark

kvark Jun 2, 2017

Member

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!

This comment has been minimized.

@kvark

kvark Jun 2, 2017

Member

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

This comment has been minimized.

@kvark

kvark Jun 2, 2017

Member

implemented in #1336

@kvark
Copy link
Member

kvark commented Jun 2, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2017

📌 Commit 8ab8e37 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2017

Testing commit 8ab8e37 with merge f7179d3...

bors-servo added 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

bors-servo commented Jun 2, 2017

💔 Test failed - status-travis

@kvark
Copy link
Member

kvark commented Jun 2, 2017

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2017

Testing commit 8ab8e37 with merge e652b78...

bors-servo added 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

bors-servo commented Jun 2, 2017

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

@bors-servo bors-servo merged commit 8ab8e37 into servo:master Jun 2, 2017
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
bors-servo added 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
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.