Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/angle/device.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A thread-local handle to the device.

use super::adapter::AngleAdapter;
use crate::angle::connection::Connection;
use crate::angle::context::{AngleContext, NativeContext};
use crate::angle::surface::{
AngleSurface, AngleSurfaceTexture, SurfaceDataGuard, Synchronization, Win32Objects,
Expand Down Expand Up @@ -188,12 +187,6 @@ impl Device {
}
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection
}

/// Returns the adapter that this device was created with.
pub fn adapter(&self) -> Adapter {
unsafe {
Expand Down
7 changes: 0 additions & 7 deletions src/base/io_surface/device.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A handle to the device. (This is a no-op, because handles are implicit in `IOSurface`.)

use super::adapter::AppleAdapter;
use super::connection::Connection;
use crate::Error;

use objc2::{rc::Retained, runtime::ProtocolObject};
Expand Down Expand Up @@ -40,12 +39,6 @@ impl Device {
)
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> AppleAdapter {
Expand Down
7 changes: 0 additions & 7 deletions src/cgl/device.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! A handle to the device. (This is a no-op, because handles are implicit in Apple's Core OpenGL.)

use super::connection::Connection;
use super::context::{CglContext, CglContextDescriptor};
use crate::base::io_surface::device::Device as SystemDevice;
use crate::cgl::context::{CurrentContextGuard, NativeContext};
Expand Down Expand Up @@ -73,12 +72,6 @@ impl Device {
self.0.native_device()
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection(self.0.connection())
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
3 changes: 0 additions & 3 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ where

// device.rs

/// Returns the display server connection that this device was created with.
fn connection(&self) -> Self::Connection;

/// Returns the adapter that this device was created with.
fn adapter(&self) -> Adapter;

Expand Down
7 changes: 0 additions & 7 deletions src/hardware_buffer/device.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A thread-local handle to the device.

use super::adapter::HardwareBufferAdapter;
use super::connection::Connection;
use super::context::{HardwareBufferContext, NativeContext};
use crate::base::egl::context::{self, CurrentContextGuard};
use crate::base::egl::device::EGL_FUNCTIONS;
Expand Down Expand Up @@ -80,12 +79,6 @@ impl Device {
NativeDevice(self.egl_display)
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
5 changes: 0 additions & 5 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ macro_rules! implement_interfaces {

// device.rs

#[inline]
fn connection(&self) -> Connection {
Device::connection(self)
}

#[inline]
fn adapter(&self) -> Adapter {
Device::adapter(self)
Expand Down
8 changes: 0 additions & 8 deletions src/mesa_surfaceless/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ impl Device {
}
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection {
native_connection: self.native_connection.clone(),
}
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
13 changes: 0 additions & 13 deletions src/multi/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ where
Def::Connection: ConnectionInterface,
Alt::Connection: ConnectionInterface,
{
/// Returns the display server connection that this device was created with.
pub fn connection(&self) -> Connection<Def, Alt> {
match *self {
Device::Default(ref device) => Connection::Default(device.connection()),
Device::Alternate(ref device) => Connection::Alternate(device.connection()),
}
}

/// Returns the adapter that this device was created with.
pub fn adapter(&self) -> Adapter {
match *self {
Expand Down Expand Up @@ -70,11 +62,6 @@ where

// device.rs

#[inline]
fn connection(&self) -> Connection<Def, Alt> {
Device::connection(self)
}

#[inline]
fn adapter(&self) -> Adapter {
Device::adapter(self)
Expand Down
1 change: 0 additions & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ pub fn test_device_accessors() {
}
Err(err) => panic!("Failed to create device: {:?}", err),
};
drop(device.connection());
drop(device.adapter());
}

Expand Down
8 changes: 0 additions & 8 deletions src/wayland/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ impl Device {
}
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection {
native_connection: self.native_connection.clone(),
}
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
7 changes: 0 additions & 7 deletions src/wgl/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::error::WindowingApiError;
use crate::renderbuffers::Renderbuffers;
use crate::surface::Framebuffer;
use crate::wgl::adapter::WglAdapter;
use crate::wgl::connection::Connection;
use crate::wgl::context::{
ContextStatus, CurrentContextGuard, FramebufferGuard, NativeContext, WglContext,
WglContextDescriptor, OPENGL_LIBRARY, WGL_EXTENSION_FUNCTIONS,
Expand Down Expand Up @@ -221,12 +220,6 @@ impl Device {
}
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
8 changes: 0 additions & 8 deletions src/x11/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ impl Device {
}
}

/// Returns the display server connection that this device was created with.
#[inline]
pub fn connection(&self) -> Connection {
Connection {
native_connection: self.native_connection.clone(),
}
}

/// Returns the adapter that this device was created with.
#[inline]
pub fn adapter(&self) -> Adapter {
Expand Down
Loading