mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a type-casting the result. Rename to SPA_PTROFF which is more expressive (and has the same number of characters so we don't need to re-indent).
This commit is contained in:
parent
e598d0a422
commit
2405f0942b
92 changed files with 248 additions and 227 deletions
|
|
@ -146,7 +146,7 @@ on_process(void *_data)
|
|||
data->cursor_rect.x = mcs->position.x;
|
||||
data->cursor_rect.y = mcs->position.y;
|
||||
|
||||
mb = SPA_MEMBER(mcs, mcs->bitmap_offset, struct spa_meta_bitmap);
|
||||
mb = SPA_PTROFF(mcs, mcs->bitmap_offset, struct spa_meta_bitmap);
|
||||
data->cursor_rect.w = mb->size.width;
|
||||
data->cursor_rect.h = mb->size.height;
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ on_process(void *_data)
|
|||
}
|
||||
|
||||
/* copy the cursor bitmap into the texture */
|
||||
src = SPA_MEMBER(mb, mb->offset, uint8_t);
|
||||
src = SPA_PTROFF(mb, mb->offset, uint8_t);
|
||||
dst = cdata;
|
||||
ostride = SPA_MIN(cstride, mb->stride);
|
||||
|
||||
|
|
@ -186,9 +186,9 @@ on_process(void *_data)
|
|||
NULL,
|
||||
sdata,
|
||||
sstride,
|
||||
SPA_MEMBER(sdata, sstride * data->size.height, void),
|
||||
SPA_PTROFF(sdata, sstride * data->size.height, void),
|
||||
sstride / 2,
|
||||
SPA_MEMBER(sdata, 5 * (sstride * data->size.height) / 4, void),
|
||||
SPA_PTROFF(sdata, 5 * (sstride * data->size.height) / 4, void),
|
||||
sstride / 2);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue