summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-10-25 12:10:24 +0100
committerRobin Watts <robin.watts@artifex.com>2017-10-25 18:02:04 +0100
commitec07e5377383b36a9fe714a1ad15b70b5df8a4a3 (patch)
tree4fc30442410f7147f1447bd3e75bf96b4c6822b1 /source/pdf
parent88f009ec79eb9b5d5773d7073523cb0aaaef6303 (diff)
downloadmupdf-ec07e5377383b36a9fe714a1ad15b70b5df8a4a3.tar.xz
Fix multithreaded crash with tiled regions.
Michael has found a crash when scrolling quickly through pages with gsview. 2 Threads are redrawing at the same time from a display list. The problem comes when both threads happen to be trying to draw the same tile from the cache at the same time. The current code alters the ->{x,y} values of the pixmap from the cache as it tiles. If 2 threads are using the same tile at the same time, this causes a race condition which can upset the clipping calculations and we can access out of range. The solution is to make a new 'wrapper' fz_pixmap around the same data, and to alter the x/y values there instead. We therefore introduce a (hopefully generally useful) function fz_new_pixmap_from_pixmap, and use that.
Diffstat (limited to 'source/pdf')
0 files changed, 0 insertions, 0 deletions