mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 21:08:10 +02:00
recording: Append new elements to the end of the bbtree chain
I have noticed that some of my objects were lost when drawing them on a recording surface and playing them back. Later elements with the same extents as a prior one tend to disappear from the chain of headers having similar extents. After doing some debugging, I found that they are not properly added to the bbtree during playback, and were instead clobbering the existing chain.
This commit is contained in:
parent
6ed1da67b5
commit
62b795fe52
1 changed files with 4 additions and 1 deletions
|
|
@ -210,7 +210,10 @@ bbtree_add (struct bbtree *bbt,
|
|||
if (box->p1.x == bbt->extents.p1.x && box->p1.y == bbt->extents.p1.y &&
|
||||
box->p2.x == bbt->extents.p2.x && box->p2.y == bbt->extents.p2.y)
|
||||
{
|
||||
header->chain = bbt->chain;
|
||||
cairo_command_header_t *last = header;
|
||||
while (last->chain) /* expected to be infrequent */
|
||||
last = last->chain;
|
||||
last->chain = bbt->chain;
|
||||
bbt->chain = header;
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue