mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Add HTMLCanvasDataSource::Empty
that represent transparent black instead of HTMLCanvasDataSource::Image(None)
(#33519)
* `HTMLCanvasDataSource::Empty` that represent transparent black instead of Image(None)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix warning from 3a0d27b231
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
bab769a7cf
commit
3e29131d64
7 changed files with 41 additions and 36 deletions
|
@ -149,9 +149,10 @@ where
|
|||
let source = match canvas_data.source {
|
||||
HTMLCanvasDataSource::WebGL(texture_id) => CanvasSource::WebGL(texture_id),
|
||||
HTMLCanvasDataSource::Image(ipc_sender) => {
|
||||
CanvasSource::Image(ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer))))
|
||||
CanvasSource::Image(Arc::new(Mutex::new(ipc_sender)))
|
||||
},
|
||||
HTMLCanvasDataSource::WebGPU(image_key) => CanvasSource::WebGPU(image_key),
|
||||
HTMLCanvasDataSource::Empty => CanvasSource::Empty,
|
||||
};
|
||||
Some((
|
||||
CanvasInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue