Mesa (master): st/vdpau: Add rotation v2
Christian König
deathsimple at kemper.freedesktop.org
Fri Mar 7 08:22:30 UTC 2014
Module: Mesa
Branch: master
Commit: 7233d4479ece9645174ce696ececf88953b52e86
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7233d4479ece9645174ce696ececf88953b52e86
Author: Kusanagi Kouichi <slash at ac.auone-net.jp>
Date: Fri Mar 7 11:07:58 2014 +0900
st/vdpau: Add rotation v2
v2: add static asserts
Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
Reviewed-by: Christian König <christian.koenig at amd.com>
---
src/gallium/state_trackers/vdpau/output.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 9cb1106..457f678 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -658,6 +658,11 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface,
vl_compositor_set_rgba_layer(cstate, compositor, 0, src_vlsurface->sampler_view,
RectToPipe(source_rect, &src_rect), NULL,
ColorsToPipe(colors, flags, vlcolors));
+ STATIC_ASSERT(VL_COMPOSITOR_ROTATE_0 == VDP_OUTPUT_SURFACE_RENDER_ROTATE_0);
+ STATIC_ASSERT(VL_COMPOSITOR_ROTATE_90 == VDP_OUTPUT_SURFACE_RENDER_ROTATE_90);
+ STATIC_ASSERT(VL_COMPOSITOR_ROTATE_180 == VDP_OUTPUT_SURFACE_RENDER_ROTATE_180);
+ STATIC_ASSERT(VL_COMPOSITOR_ROTATE_270 == VDP_OUTPUT_SURFACE_RENDER_ROTATE_270);
+ vl_compositor_set_layer_rotation(cstate, 0, flags & 3);
vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect));
vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false);
@@ -717,6 +722,7 @@ vlVdpOutputSurfaceRenderBitmapSurface(VdpOutputSurface destination_surface,
vl_compositor_set_rgba_layer(cstate, compositor, 0, src_vlsurface->sampler_view,
RectToPipe(source_rect, &src_rect), NULL,
ColorsToPipe(colors, flags, vlcolors));
+ vl_compositor_set_layer_rotation(cstate, 0, flags & 3);
vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect));
vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false);
More information about the mesa-commit
mailing list