summaryrefslogtreecommitdiff
path: root/src/sna/sna_video.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-29 13:33:26 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-29 13:33:26 +0100
commita0bb41d16f75901bc18b7024679e2b3a35fc14f6 (patch)
tree482789c0b92f1c5c3def2c93fb972372b1a56630 /src/sna/sna_video.c
parent0dd20381364aabede2e1306945abe21d57c1d7b4 (diff)
sna/video: The sprite framebuffer also encodes its format
So we need to check whether the cached framebuffer matches the requested format, or else recreate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video.c')
-rw-r--r--src/sna/sna_video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index 61f66151..132ca280 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -98,7 +98,8 @@ sna_video_buffer(struct sna_video *video,
if (video->buf && video->buf->scanout) {
if (frame->width != video->width ||
- frame->height != video->height)
+ frame->height != video->height ||
+ frame->id != video->format)
sna_video_free_buffers(video);
}
@@ -115,6 +116,7 @@ sna_video_buffer(struct sna_video *video,
video->width = frame->width;
video->height = frame->height;
+ video->format = frame->id;
return video->buf;
}