graphicsdriver/metal: Remove unused properties (#767)

This commit is contained in:
Hajime Hoshi 2019-01-01 05:09:02 +09:00
parent 7583fada52
commit 61afdc8852
2 changed files with 4 additions and 18 deletions

View File

@ -381,12 +381,6 @@ type Device struct {
// LowPower indicates whether a device is low-power. // LowPower indicates whether a device is low-power.
LowPower bool LowPower bool
// Removable determines whether or not a GPU is removable.
Removable bool
// RegistryID is the registry ID value for the device.
RegistryID uint64
// Name is the name of the device. // Name is the name of the device.
Name string Name string
} }
@ -401,12 +395,10 @@ func CreateSystemDefaultDevice() (Device, error) {
} }
return Device{ return Device{
device: d.Device, device: d.Device,
Headless: d.Headless != 0, Headless: d.Headless != 0,
LowPower: d.LowPower != 0, LowPower: d.LowPower != 0,
Removable: d.Removable != 0, Name: C.GoString(d.Name),
RegistryID: uint64(d.RegistryID),
Name: C.GoString(d.Name),
}, nil }, nil
} }
@ -424,8 +416,6 @@ func CopyAllDevices() []Device {
ds[i].device = d.Device ds[i].device = d.Device
ds[i].Headless = d.Headless != 0 ds[i].Headless = d.Headless != 0
ds[i].LowPower = d.LowPower != 0 ds[i].LowPower = d.LowPower != 0
ds[i].Removable = d.Removable != 0
ds[i].RegistryID = uint64(d.RegistryID)
ds[i].Name = C.GoString(d.Name) ds[i].Name = C.GoString(d.Name)
} }
return ds return ds

View File

@ -30,8 +30,6 @@ struct Device CreateSystemDefaultDevice() {
d.Device = device; d.Device = device;
d.Headless = device.headless; d.Headless = device.headless;
d.LowPower = device.lowPower; d.LowPower = device.lowPower;
d.Removable = device.removable;
d.RegistryID = device.registryID;
d.Name = device.name.UTF8String; d.Name = device.name.UTF8String;
return d; return d;
} }
@ -46,8 +44,6 @@ struct Devices CopyAllDevices() {
d.Devices[i].Device = devices[i]; d.Devices[i].Device = devices[i];
d.Devices[i].Headless = devices[i].headless; d.Devices[i].Headless = devices[i].headless;
d.Devices[i].LowPower = devices[i].lowPower; d.Devices[i].LowPower = devices[i].lowPower;
d.Devices[i].Removable = devices[i].removable;
d.Devices[i].RegistryID = devices[i].registryID;
d.Devices[i].Name = devices[i].name.UTF8String; d.Devices[i].Name = devices[i].name.UTF8String;
} }
d.Length = devices.count; d.Length = devices.count;