diff --git a/webrender/src/device.rs b/webrender/src/device.rs index fc9c1df50b..b895fd5909 100644 --- a/webrender/src/device.rs +++ b/webrender/src/device.rs @@ -676,10 +676,10 @@ impl GpuProfiler { GpuProfiler { next_frame: 0, frames: [ - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), - GpuFrameProfile::new(gl.clone()), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), + GpuFrameProfile::new(Rc::clone(&gl)), ], } } @@ -721,12 +721,12 @@ impl GpuMarker { gl::GlType::Gl => { gl.push_group_marker_ext(message); GpuMarker{ - gl: gl.clone(), + gl: Rc::clone(&gl), } } gl::GlType::Gles => { GpuMarker{ - gl: gl.clone(), + gl: Rc::clone(&gl), } } } @@ -1108,7 +1108,7 @@ impl Device { }; let texture = Texture { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), id: id, width: 0, height: 0, @@ -1451,7 +1451,7 @@ impl Device { } let program = Program { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), name: base_filename.to_owned(), id: pid, u_transform: -1, @@ -1795,7 +1795,7 @@ impl Device { ibo_id.bind(self.gl()); // force it to be a part of VAO let vao = VAO { - gl: self.gl.clone(), + gl: Rc::clone(&self.gl), id: vao_id, ibo_id: ibo_id, main_vbo_id: main_vbo_id,