sna: Add missing ValidatePicture() for flattening alphamaps

Reported-by: Armands Liepins <armandsl@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56367
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-10-24 22:56:20 +01:00
parent 1a489142c8
commit efb8ff1649
1 changed files with 3 additions and 0 deletions

View File

@ -1342,6 +1342,7 @@ sna_render_picture_flatten(struct sna *sna,
assert(w <= sna->render.max_3d_size && h <= sna->render.max_3d_size);
/* XXX shortcut a8? */
DBG(("%s: %dx%d\n", __FUNCION__, w, h));
pixmap = screen->CreatePixmap(screen, w, h, 32, SNA_CREATE_SCRATCH);
if (pixmap == NullPixmap)
@ -1354,6 +1355,8 @@ sna_render_picture_flatten(struct sna *sna,
if (tmp == NULL)
return 0;
ValidatePicture(tmp);
old_format = picture->format;
picture->format = PICT_FORMAT(PICT_FORMAT_BPP(picture->format),
PICT_FORMAT_TYPE(picture->format),