-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add newTextureWithDescriptor:iosurface:plane:
#87
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1380,6 +1380,10 @@ type MTLNewRenderPipelineStateWithReflectionCompletionHandler = extern fn(render | |
type MTLNewComputePipelineStateCompletionHandler = extern fn(computePipelineState: id, error: id); | ||
type MTLNewComputePipelineStateWithReflectionCompletionHandler = extern fn(computePipelineState: id, reflection: id, error: id);*/ | ||
|
||
#[derive(Debug, Copy, Clone)] | ||
pub enum _IOSurface { } | ||
pub type IOSurfaceRef = *mut _IOSurface; | ||
|
||
pub enum MTLDevice {} | ||
|
||
foreign_obj_type! { | ||
|
@@ -1665,6 +1669,14 @@ impl DeviceRef { | |
pub fn new_texture(&self, descriptor: &TextureDescriptorRef) -> Texture { | ||
unsafe { msg_send![self, newTextureWithDescriptor: descriptor] } | ||
} | ||
|
||
pub fn new_texture_with_surface_plane(&self, descriptor: &TextureDescriptorRef, iosurface: IOSurfaceRef, plane: NSUInteger) -> Texture { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. like with other ref arguments, we should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I mentioned it briefly in #38, should we be using https://github.com/servo/core-foundation-rs/blob/37b82c5564428818726887e7a17450c8bc3227d0/io-surface/src/lib.rs#L19? |
||
unsafe { | ||
msg_send![self, newTextureWithDescriptor: descriptor | ||
iosurface: iosurface | ||
plane: plane] | ||
} | ||
} | ||
|
||
pub fn new_sampler(&self, descriptor: &SamplerDescriptorRef) -> SamplerState { | ||
unsafe { msg_send![self, newSamplerStateWithDescriptor: descriptor] } | ||
|
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 should probably declare it as a full-featured
foreign_obj_type
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.
Ok.