mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Send an IpcSharedMemory in tex_image_2d and tex_sub_image_2d
This avoids a copy in the case of textures coming from HTMLImageElement.
This commit is contained in:
parent
cfca906ee2
commit
804d964b7d
4 changed files with 56 additions and 38 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use euclid::{Rect, Size2D};
|
||||
use gleam::gl;
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender};
|
||||
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSharedMemory};
|
||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||
use pixels::PixelFormat;
|
||||
use serde_bytes::ByteBuf;
|
||||
|
@ -284,7 +284,7 @@ pub enum WebGLCommand {
|
|||
alpha_treatment: Option<AlphaTreatment>,
|
||||
y_axis_treatment: YAxisTreatment,
|
||||
pixel_format: Option<PixelFormat>,
|
||||
receiver: IpcBytesReceiver,
|
||||
data: IpcSharedMemory,
|
||||
},
|
||||
TexSubImage2D {
|
||||
target: u32,
|
||||
|
@ -300,7 +300,7 @@ pub enum WebGLCommand {
|
|||
alpha_treatment: Option<AlphaTreatment>,
|
||||
y_axis_treatment: YAxisTreatment,
|
||||
pixel_format: Option<PixelFormat>,
|
||||
receiver: IpcBytesReceiver,
|
||||
data: IpcSharedMemory,
|
||||
},
|
||||
DrawingBufferWidth(WebGLSender<i32>),
|
||||
DrawingBufferHeight(WebGLSender<i32>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue