-
Notifications
You must be signed in to change notification settings - Fork 279
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
Conversation
Also remove the gpu64 data texture, as it's now unused.
r? @kvark |
Pushed a couple of follow up commits on to this PR - port the text run primitive, and remove the temporary GpuLocation enum. |
There was a problem hiding this 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], |
There was a problem hiding this comment.
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! |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented in #1336
@bors-servo r+ |
📌 Commit 8ab8e37 has been approved by |
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 -->
💔 Test failed - status-travis |
@bors-servo retry |
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 -->
☀️ Test successful - status-travis |
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 -->
Also remove the gpu64 data texture, as it's now unused.
This change is