Skip to content
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

added MetalLayer methods #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adamnemecek
Copy link
Contributor

No description provided.

@adamnemecek adamnemecek changed the title added CAMetalLayer methods added MetalLayer methods Oct 3, 2020
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to go through the methods and come up with a sound explanation as to why some of them are unsafe but others are not.

@@ -451,13 +469,13 @@ pub use {
pub use mps::*;

#[inline]
unsafe fn obj_drop<T>(p: *mut T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should probably be left unsafe

@@ -121,13 +121,13 @@ impl FunctionConstantValues {
}

impl FunctionConstantValuesRef {
pub unsafe fn set_constant_value_at_index(
pub fn set_constant_value_at_index(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can't be safe, since we are passing a raw pointer in

@@ -163,26 +163,28 @@ foreign_obj_type! {

impl RenderPipelineReflection {
#[cfg(feature = "private")]
pub unsafe fn new(
pub fn new(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly, can't be safe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants