Skip to content

Commit 3a2dba2

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 883fdaa commit 3a2dba2

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
@@ -72,6 +72,7 @@ ImplicitLayout
7272
QueueWriteAction
7373
RawString
7474
TextureAction
75+
ImageDataLayout
7576
}
7677
;
7778
use
@@ -6759,114 +6760,6 @@ action
67596760
}
67606761
#
67616762
[
6762-
repr
6763-
(
6764-
C
6765-
)
6766-
]
6767-
pub
6768-
struct
6769-
ImageDataLayout
6770-
<
6771-
'
6772-
a
6773-
>
6774-
{
6775-
pub
6776-
offset
6777-
:
6778-
wgt
6779-
:
6780-
:
6781-
BufferAddress
6782-
pub
6783-
bytes_per_row
6784-
:
6785-
Option
6786-
<
6787-
&
6788-
'
6789-
a
6790-
u32
6791-
>
6792-
pub
6793-
rows_per_image
6794-
:
6795-
Option
6796-
<
6797-
&
6798-
'
6799-
a
6800-
u32
6801-
>
6802-
}
6803-
impl
6804-
<
6805-
'
6806-
a
6807-
>
6808-
ImageDataLayout
6809-
<
6810-
'
6811-
a
6812-
>
6813-
{
6814-
fn
6815-
into_wgt
6816-
(
6817-
&
6818-
self
6819-
)
6820-
-
6821-
>
6822-
wgt
6823-
:
6824-
:
6825-
ImageDataLayout
6826-
{
6827-
wgt
6828-
:
6829-
:
6830-
ImageDataLayout
6831-
{
6832-
offset
6833-
:
6834-
self
6835-
.
6836-
offset
6837-
bytes_per_row
6838-
:
6839-
self
6840-
.
6841-
bytes_per_row
6842-
.
6843-
map
6844-
(
6845-
|
6846-
bpr
6847-
|
6848-
*
6849-
bpr
6850-
)
6851-
rows_per_image
6852-
:
6853-
self
6854-
.
6855-
rows_per_image
6856-
.
6857-
map
6858-
(
6859-
|
6860-
rpi
6861-
|
6862-
*
6863-
rpi
6864-
)
6865-
}
6866-
}
6867-
}
6868-
#
6869-
[
68706763
no_mangle
68716764
]
68726765
pub

gfx/wgpu_bindings/src/lib.rs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,3 +1241,111 @@ data
12411241
)
12421242
}
12431243
}
1244+
#
1245+
[
1246+
repr
1247+
(
1248+
C
1249+
)
1250+
]
1251+
pub
1252+
struct
1253+
ImageDataLayout
1254+
<
1255+
'
1256+
a
1257+
>
1258+
{
1259+
pub
1260+
offset
1261+
:
1262+
wgt
1263+
:
1264+
:
1265+
BufferAddress
1266+
pub
1267+
bytes_per_row
1268+
:
1269+
Option
1270+
<
1271+
&
1272+
'
1273+
a
1274+
u32
1275+
>
1276+
pub
1277+
rows_per_image
1278+
:
1279+
Option
1280+
<
1281+
&
1282+
'
1283+
a
1284+
u32
1285+
>
1286+
}
1287+
impl
1288+
<
1289+
'
1290+
a
1291+
>
1292+
ImageDataLayout
1293+
<
1294+
'
1295+
a
1296+
>
1297+
{
1298+
fn
1299+
into_wgt
1300+
(
1301+
&
1302+
self
1303+
)
1304+
-
1305+
>
1306+
wgt
1307+
:
1308+
:
1309+
ImageDataLayout
1310+
{
1311+
wgt
1312+
:
1313+
:
1314+
ImageDataLayout
1315+
{
1316+
offset
1317+
:
1318+
self
1319+
.
1320+
offset
1321+
bytes_per_row
1322+
:
1323+
self
1324+
.
1325+
bytes_per_row
1326+
.
1327+
map
1328+
(
1329+
|
1330+
bpr
1331+
|
1332+
*
1333+
bpr
1334+
)
1335+
rows_per_image
1336+
:
1337+
self
1338+
.
1339+
rows_per_image
1340+
.
1341+
map
1342+
(
1343+
|
1344+
rpi
1345+
|
1346+
*
1347+
rpi
1348+
)
1349+
}
1350+
}
1351+
}

0 commit comments

Comments
 (0)