mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Transform convert_* functions in gpuconvert.rs to From/TryFrom implementations (#33302)
Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
parent
c0ced7a524
commit
00389cf007
6 changed files with 493 additions and 483 deletions
|
@ -19,7 +19,6 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::gpubindgroup::GPUBindGroup;
|
||||
use crate::dom::gpubuffer::GPUBuffer;
|
||||
use crate::dom::gpucommandencoder::GPUCommandEncoder;
|
||||
use crate::dom::gpuconvert::convert_color;
|
||||
use crate::dom::gpurenderbundle::GPURenderBundle;
|
||||
use crate::dom::gpurenderpipeline::GPURenderPipeline;
|
||||
|
||||
|
@ -132,7 +131,7 @@ impl GPURenderPassEncoderMethods for GPURenderPassEncoder {
|
|||
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassencoder-setblendcolor>
|
||||
fn SetBlendConstant(&self, color: GPUColor) -> Fallible<()> {
|
||||
self.send_render_command(RenderCommand::SetBlendConstant(convert_color(&color)?));
|
||||
self.send_render_command(RenderCommand::SetBlendConstant((&color).try_into()?));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue