diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-06 21:40:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-06 21:40:59 +0100 |
commit | 7e1e18aca214a8705270972131a1800c81bc3b4d (patch) | |
tree | 718eb2f55cae18bce617f9336c8e71db670816a9 /src/sna/sna_video_overlay.c | |
parent | 0869acc0a6a5b92f5528049d2bd5ec62121ba114 (diff) |
sna/video: Fixup formats to select visuals
Fixes regression from
commit 195a51353c3af7bd253227da5f759f06cea01f73 [2.21.8]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Apr 9 19:13:46 2013 +0100
sna/video: Convert to a pure Xv backend
Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65479
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_overlay.c')
-rw-r--r-- | src/sna/sna_video_overlay.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index 26b30e2d..5ec9c179 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -57,9 +57,7 @@ static Atom xvSyncToVblank; #define IMAGE_MAX_WIDTH_LEGACY 1024 #define IMAGE_MAX_HEIGHT_LEGACY 1088 -static const XvFormatRec Formats[] = { - {15, TrueColor}, {16, TrueColor}, {24, TrueColor} -}; +static XvFormatRec Formats[] = { {15}, {16}, {24} }; static const XvAttributeRec Attributes[] = { {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, @@ -715,8 +713,9 @@ void sna_video_overlay_setup(struct sna *sna, ScreenPtr screen) adaptor->pEncodings[0].height = sna->kgem.gen < 021 ? IMAGE_MAX_HEIGHT_LEGACY : IMAGE_MAX_HEIGHT; adaptor->pEncodings[0].rate.numerator = 1; adaptor->pEncodings[0].rate.denominator = 1; - adaptor->nFormats = ARRAY_SIZE(Formats); adaptor->pFormats = Formats; + adaptor->nFormats = sna_xv_fixup_formats(screen, Formats, + ARRAY_SIZE(Formats)); adaptor->nAttributes = NUM_ATTRIBUTES; if (HAS_GAMMA(sna)) adaptor->nAttributes += GAMMA_ATTRIBUTES; |