From 2bb28489eec1d9c465f0be441d8280d0670bd7e5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 22 Oct 2013 19:04:35 -0700 Subject: [PATCH] Update for IOSurface changes --- platform/macos.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/macos.rs b/platform/macos.rs index c050680..1f6625d 100644 --- a/platform/macos.rs +++ b/platform/macos.rs @@ -14,7 +14,6 @@ use extra::arc::Arc; use geom::size::Size2D; use io_surface::{IOSurface, kIOSurfaceBytesPerElement, kIOSurfaceBytesPerRow}; use io_surface::{kIOSurfaceHeight, kIOSurfaceIsGlobal, kIOSurfaceWidth}; -use io_surface::IOSurfaceMethods; use opengles::cgl::{CGLChoosePixelFormat, CGLContextObj, CGLCreateContext}; use opengles::cgl::{CGLSetCurrentContext, CGLTexImageIOSurface2D, kCGLNoError, kCGLPFACompliant}; use opengles::cgl::{kCGLPFADoubleBuffer}; @@ -25,6 +24,7 @@ use opengles::gl2::{TEXTURE_RECTANGLE_ARB, TEXTURE_WRAP_S, TEXTURE_WRAP_T}; use opengles::gl2::{UNSIGNED_INT_8_8_8_8_REV}; use opengles::gl2; use std::cast::transmute; +use std::cast; use std::ptr::{null, to_unsafe_ptr}; // FIXME: This is not good. @@ -179,7 +179,7 @@ pub fn bind_surface_to_texture(context: &GraphicsContext, surface: &IOSurface, s size.height as GLsizei, BGRA as GLenum, UNSIGNED_INT_8_8_8_8_REV, - transmute(surface.obj.clone()), + cast::transmute_copy(&surface.contents), 0); assert!(gl_error == kCGLNoError); }