xorg: Connect up the glamor XV code, xorg DDX-only for now.
Porting this code to be non-xorg-dependent is going to take
significant hacking, so just dump it in the glamoregl module for the
moment, so I can hack on it while regression testing.
v2: Fix compiler warnings by adding #include dix-config.h at the top,
    don't try to auto-init (I'll try to fix the xv ABI later).
v3: Fix last minute breakage of having reintroduced xf86ScrnToScreen
    (one of the compat macros).  Just use the drawable's pScreen instead.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									8d1cca3063
								
							
						
					
					
						commit
						2d20f75b60
					
				| 
						 | 
				
			
			@ -37,7 +37,6 @@ libglamor_la_SOURCES = \
 | 
			
		|||
	glamor_window.c\
 | 
			
		||||
	glamor_fbo.c\
 | 
			
		||||
	glamor_compositerects.c\
 | 
			
		||||
	glamor_xv.c\
 | 
			
		||||
	glamor_utils.h\
 | 
			
		||||
	glamor.h
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,6 +35,9 @@
 | 
			
		|||
#include <picturestr.h>
 | 
			
		||||
#include <fb.h>
 | 
			
		||||
#include <fbpict.h>
 | 
			
		||||
#ifdef GLAMOR_FOR_XORG
 | 
			
		||||
#include <xf86xv.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
struct glamor_context;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -434,7 +437,7 @@ extern _X_EXPORT Bool glamor_poly_line_nf(DrawablePtr pDrawable, GCPtr pGC,
 | 
			
		|||
extern _X_EXPORT Bool glamor_poly_lines_nf(DrawablePtr drawable, GCPtr gc,
 | 
			
		||||
                                           int mode, int n, DDXPointPtr points);
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
#ifdef GLAMOR_FOR_XORG
 | 
			
		||||
extern _X_EXPORT XF86VideoAdaptorPtr glamor_xv_init(ScreenPtr pScreen,
 | 
			
		||||
                                                    int num_texture_ports);
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,7 +41,7 @@ static XF86ModuleVersionInfo VersRec = {
 | 
			
		|||
    MODINFOSTRING1,
 | 
			
		||||
    MODINFOSTRING2,
 | 
			
		||||
    XORG_VERSION_CURRENT,
 | 
			
		||||
    0, 5, 1, /* version */
 | 
			
		||||
    1, 0, 0, /* version */
 | 
			
		||||
    ABI_CLASS_ANSIC,            /* Only need the ansic layer */
 | 
			
		||||
    ABI_ANSIC_VERSION,
 | 
			
		||||
    MOD_CLASS_NONE,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,10 +32,14 @@
 | 
			
		|||
 * Xv acceleration implementation
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_DIX_CONFIG_H
 | 
			
		||||
#include <dix-config.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "xf86xv.h"
 | 
			
		||||
#define GLAMOR_FOR_XORG
 | 
			
		||||
#include "glamor_priv.h"
 | 
			
		||||
 | 
			
		||||
#ifdef GLAMOR_XV
 | 
			
		||||
#include "xf86xv.h"
 | 
			
		||||
#include <X11/extensions/Xv.h>
 | 
			
		||||
#include "fourcc.h"
 | 
			
		||||
/* Reference color space transform data */
 | 
			
		||||
| 
						 | 
				
			
			@ -430,7 +434,7 @@ glamor_xv_put_image(ScrnInfoPtr pScrn,
 | 
			
		|||
                    Bool sync,
 | 
			
		||||
                    RegionPtr clipBoxes, void *data, DrawablePtr pDrawable)
 | 
			
		||||
{
 | 
			
		||||
    ScreenPtr screen = xf86ScrnToScreen(pScrn);
 | 
			
		||||
    ScreenPtr screen = pDrawable->pScreen;
 | 
			
		||||
    glamor_port_private *port_priv = (glamor_port_private *) data;
 | 
			
		||||
    INT32 x1, x2, y1, y2;
 | 
			
		||||
    int srcPitch, srcPitch2;
 | 
			
		||||
| 
						 | 
				
			
			@ -614,12 +618,3 @@ glamor_xv_init(ScreenPtr screen, int num_texture_ports)
 | 
			
		|||
    }
 | 
			
		||||
    return adapt;
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
#if 0
 | 
			
		||||
XF86VideoAdaptorPtr
 | 
			
		||||
glamor_xv_init(ScreenPtr screen, int num_texture_ports)
 | 
			
		||||
{
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,6 +24,7 @@ module_LTLIBRARIES = libglamoregl.la
 | 
			
		|||
libglamoregl_la_SOURCES = \
 | 
			
		||||
	$(top_srcdir)/glamor/glamor_egl.c \
 | 
			
		||||
	$(top_srcdir)/glamor/glamor_eglmodule.c \
 | 
			
		||||
	$(top_srcdir)/glamor/glamor_xv.c \
 | 
			
		||||
	$()
 | 
			
		||||
 | 
			
		||||
libglamoregl_la_LDFLAGS = \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue