Skip to content

Commit 2f51cb4

Browse files
committed
Bug 1829305: refactor(wgpu_bindings): move ImageDataLayout to crate root r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D176206 UltraBlame original commit: 2a0fc0206bf071f59eaeedb78609318c241897bf
1 parent 2db575a commit 2f51cb4

File tree

2 files changed

+109
-108
lines changed

2 files changed

+109
-108
lines changed

gfx/wgpu_bindings/src/client.rs

Lines changed: 1 addition & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ImplicitLayout
1414
QueueWriteAction
1515
RawString
1616
TextureAction
17+
ImageDataLayout
1718
}
1819
;
1920
use
@@ -6535,114 +6536,6 @@ action
65356536
}
65366537
#
65376538
[
6538-
repr
6539-
(
6540-
C
6541-
)
6542-
]
6543-
pub
6544-
struct
6545-
ImageDataLayout
6546-
<
6547-
'
6548-
a
6549-
>
6550-
{
6551-
pub
6552-
offset
6553-
:
6554-
wgt
6555-
:
6556-
:
6557-
BufferAddress
6558-
pub
6559-
bytes_per_row
6560-
:
6561-
Option
6562-
<
6563-
&
6564-
'
6565-
a
6566-
u32
6567-
>
6568-
pub
6569-
rows_per_image
6570-
:
6571-
Option
6572-
<
6573-
&
6574-
'
6575-
a
6576-
u32
6577-
>
6578-
}
6579-
impl
6580-
<
6581-
'
6582-
a
6583-
>
6584-
ImageDataLayout
6585-
<
6586-
'
6587-
a
6588-
>
6589-
{
6590-
fn
6591-
into_wgt
6592-
(
6593-
&
6594-
self
6595-
)
6596-
-
6597-
>
6598-
wgt
6599-
:
6600-
:
6601-
ImageDataLayout
6602-
{
6603-
wgt
6604-
:
6605-
:
6606-
ImageDataLayout
6607-
{
6608-
offset
6609-
:
6610-
self
6611-
.
6612-
offset
6613-
bytes_per_row
6614-
:
6615-
self
6616-
.
6617-
bytes_per_row
6618-
.
6619-
map
6620-
(
6621-
|
6622-
bpr
6623-
|
6624-
*
6625-
bpr
6626-
)
6627-
rows_per_image
6628-
:
6629-
self
6630-
.
6631-
rows_per_image
6632-
.
6633-
map
6634-
(
6635-
|
6636-
rpi
6637-
|
6638-
*
6639-
rpi
6640-
)
6641-
}
6642-
}
6643-
}
6644-
#
6645-
[
66466539
no_mangle
66476540
]
66486541
pub

gfx/wgpu_bindings/src/lib.rs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,3 +1090,111 @@ data
10901090
)
10911091
}
10921092
}
1093+
#
1094+
[
1095+
repr
1096+
(
1097+
C
1098+
)
1099+
]
1100+
pub
1101+
struct
1102+
ImageDataLayout
1103+
<
1104+
'
1105+
a
1106+
>
1107+
{
1108+
pub
1109+
offset
1110+
:
1111+
wgt
1112+
:
1113+
:
1114+
BufferAddress
1115+
pub
1116+
bytes_per_row
1117+
:
1118+
Option
1119+
<
1120+
&
1121+
'
1122+
a
1123+
u32
1124+
>
1125+
pub
1126+
rows_per_image
1127+
:
1128+
Option
1129+
<
1130+
&
1131+
'
1132+
a
1133+
u32
1134+
>
1135+
}
1136+
impl
1137+
<
1138+
'
1139+
a
1140+
>
1141+
ImageDataLayout
1142+
<
1143+
'
1144+
a
1145+
>
1146+
{
1147+
fn
1148+
into_wgt
1149+
(
1150+
&
1151+
self
1152+
)
1153+
-
1154+
>
1155+
wgt
1156+
:
1157+
:
1158+
ImageDataLayout
1159+
{
1160+
wgt
1161+
:
1162+
:
1163+
ImageDataLayout
1164+
{
1165+
offset
1166+
:
1167+
self
1168+
.
1169+
offset
1170+
bytes_per_row
1171+
:
1172+
self
1173+
.
1174+
bytes_per_row
1175+
.
1176+
map
1177+
(
1178+
|
1179+
bpr
1180+
|
1181+
*
1182+
bpr
1183+
)
1184+
rows_per_image
1185+
:
1186+
self
1187+
.
1188+
rows_per_image
1189+
.
1190+
map
1191+
(
1192+
|
1193+
rpi
1194+
|
1195+
*
1196+
rpi
1197+
)
1198+
}
1199+
}
1200+
}

0 commit comments

Comments
 (0)