diff --git a/cocoa/src/quartzcore.rs b/cocoa/src/quartzcore.rs
index 5a63f4acd..6a0143c58 100644
--- a/cocoa/src/quartzcore.rs
+++ b/cocoa/src/quartzcore.rs
@@ -38,6 +38,7 @@ pub fn current_media_time() -> CFTimeInterval {
 
 // CALayer.h
 
+#[repr(transparent)]
 pub struct CALayer(id);
 
 unsafe impl Send for CALayer {}
@@ -74,6 +75,11 @@ impl CALayer {
         }
     }
 
+    #[inline]
+    pub unsafe fn from_raw(raw: id) -> Self {
+        Self(raw)
+    }
+
     #[inline]
     pub fn from_layer(other: &CALayer) -> CALayer {
         unsafe {