1 /************************************************************************** 2 * 3 * Copyright 2009 Younes Manton. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * The above copyright notice and this permission notice (including the 15 * next paragraph) shall be included in all copies or substantial portions 16 * of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * 26 **************************************************************************/ 27 28 #ifndef vl_compositor_gfx_h 29 #define vl_compositor_gfx_h 30 31 #include "vl_compositor.h" 32 33 /** 34 * create vertex shader 35 */ 36 void * 37 create_vert_shader(struct vl_compositor *c); 38 39 /** 40 * create YCbCr-to-RGB fragment 41 */ 42 void * 43 create_frag_shader_video_buffer(struct vl_compositor *c); 44 45 /** 46 * create YCbCr-to-RGB weave fragment shader 47 */ 48 void * 49 create_frag_shader_weave_rgb(struct vl_compositor *c); 50 51 /** 52 * create YCbCr i-to-YCbCr p deint fragment shader 53 */ 54 void * 55 create_frag_shader_deint_yuv(struct vl_compositor *c, 56 bool y, 57 bool w); 58 59 /** 60 * create YUV/RGB-Palette-to-RGB fragment shader 61 */ 62 void * 63 create_frag_shader_palette(struct vl_compositor *c, 64 bool include_cc); 65 66 /** 67 * create YCbCr RGB-to-RGB fragment shader 68 */ 69 void * 70 create_frag_shader_rgba(struct vl_compositor *c); 71 72 /** 73 * create RGB-to-YUV fragment shader 74 */ 75 void * 76 create_frag_shader_rgb_yuv(struct vl_compositor *c, 77 bool y); 78 79 /** 80 * render the layers to the frontbuffer with graphic shader 81 */ 82 void 83 vl_compositor_gfx_render(struct vl_compositor_state *s, 84 struct vl_compositor *c, 85 struct pipe_surface *dst_surface, 86 struct u_rect *dirty_area, 87 bool clear_dirty); 88 #endif /* vl_compositor_gfx_h */ 89