[PATCH xserver 4/8] glamor: Split out glamor_xv.h
Adam Jackson
ajax at redhat.com
Wed Nov 1 20:31:32 UTC 2017
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
glamor/Makefile.am | 3 +-
glamor/glamor_priv.h | 52 --------------------
glamor/glamor_xv.c | 2 +-
glamor/glamor_xv.h | 86 ++++++++++++++++++++++++++++++++++
hw/kdrive/ephyr/ephyr_glamor_xv.c | 2 +-
hw/xfree86/glamor_egl/glamor_xf86_xv.c | 2 +-
hw/xwayland/xwayland-glamor-xv.c | 2 +-
7 files changed, 92 insertions(+), 57 deletions(-)
create mode 100644 glamor/glamor_xv.h
diff --git a/glamor/Makefile.am b/glamor/Makefile.am
index 8c79994e0..b5395259d 100644
--- a/glamor/Makefile.am
+++ b/glamor/Makefile.am
@@ -51,7 +51,8 @@ libglamor_la_SOURCES = \
if XV
libglamor_la_SOURCES += \
- glamor_xv.c
+ glamor_xv.c \
+ glamor_xv.h
endif
libglamor_egl_stubs_la_SOURCES = \
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index ad54b3197..8fc2d7bc4 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -30,7 +30,6 @@
#include "dix-config.h"
#include "glamor.h"
-#include "xvdix.h"
#if XSYNC
#include "misyncshm.h"
@@ -857,57 +856,6 @@ void
glamor_solid_boxes(PixmapPtr pixmap,
BoxPtr box, int nbox, unsigned long fg_pixel);
-
-/* glamor_xv */
-typedef struct {
- uint32_t transform_index;
- uint32_t gamma; /* gamma value x 1000 */
- int brightness;
- int saturation;
- int hue;
- int contrast;
-
- DrawablePtr pDraw;
- PixmapPtr pPixmap;
- uint32_t src_pitch;
- uint8_t *src_addr;
- int src_w, src_h, dst_w, dst_h;
- int src_x, src_y, drw_x, drw_y;
- int w, h;
- RegionRec clip;
- PixmapPtr src_pix[3]; /* y, u, v for planar */
- int src_pix_w, src_pix_h;
-} glamor_port_private;
-
-extern XvAttributeRec glamor_xv_attributes[];
-extern int glamor_xv_num_attributes;
-extern XvImageRec glamor_xv_images[];
-extern int glamor_xv_num_images;
-
-void glamor_xv_init_port(glamor_port_private *port_priv);
-void glamor_xv_stop_video(glamor_port_private *port_priv);
-int glamor_xv_set_port_attribute(glamor_port_private *port_priv,
- Atom attribute, INT32 value);
-int glamor_xv_get_port_attribute(glamor_port_private *port_priv,
- Atom attribute, INT32 *value);
-int glamor_xv_query_image_attributes(int id,
- unsigned short *w, unsigned short *h,
- int *pitches, int *offsets);
-int glamor_xv_put_image(glamor_port_private *port_priv,
- DrawablePtr pDrawable,
- short src_x, short src_y,
- short drw_x, short drw_y,
- short src_w, short src_h,
- short drw_w, short drw_h,
- int id,
- unsigned char *buf,
- short width,
- short height,
- Bool sync,
- RegionPtr clipBoxes);
-void glamor_xv_core_init(ScreenPtr screen);
-void glamor_xv_render(glamor_port_private *port_priv);
-
#include "glamor_utils.h"
#if 0
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index 31320d124..aa6d88ec0 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -36,7 +36,7 @@
#include <dix-config.h>
#endif
-#include "glamor_priv.h"
+#include "glamor_xv.h"
#include "glamor_transform.h"
#include "glamor_transfer.h"
diff --git a/glamor/glamor_xv.h b/glamor/glamor_xv.h
new file mode 100644
index 000000000..a12b44aea
--- /dev/null
+++ b/glamor/glamor_xv.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright © 2008 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <eric at anholt.net>
+ *
+ */
+
+#ifndef GLAMOR_XV_H
+#define GLAMOR_XV_H
+
+#include "dix-config.h"
+
+#include "glamor_priv.h"
+#include "xvdix.h"
+
+/* glamor_xv */
+typedef struct {
+ uint32_t transform_index;
+ uint32_t gamma; /* gamma value x 1000 */
+ int brightness;
+ int saturation;
+ int hue;
+ int contrast;
+
+ DrawablePtr pDraw;
+ PixmapPtr pPixmap;
+ uint32_t src_pitch;
+ uint8_t *src_addr;
+ int src_w, src_h, dst_w, dst_h;
+ int src_x, src_y, drw_x, drw_y;
+ int w, h;
+ RegionRec clip;
+ PixmapPtr src_pix[3]; /* y, u, v for planar */
+ int src_pix_w, src_pix_h;
+} glamor_port_private;
+
+extern XvAttributeRec glamor_xv_attributes[];
+extern int glamor_xv_num_attributes;
+extern XvImageRec glamor_xv_images[];
+extern int glamor_xv_num_images;
+
+void glamor_xv_init_port(glamor_port_private *port_priv);
+void glamor_xv_stop_video(glamor_port_private *port_priv);
+int glamor_xv_set_port_attribute(glamor_port_private *port_priv,
+ Atom attribute, INT32 value);
+int glamor_xv_get_port_attribute(glamor_port_private *port_priv,
+ Atom attribute, INT32 *value);
+int glamor_xv_query_image_attributes(int id,
+ unsigned short *w, unsigned short *h,
+ int *pitches, int *offsets);
+int glamor_xv_put_image(glamor_port_private *port_priv,
+ DrawablePtr pDrawable,
+ short src_x, short src_y,
+ short drw_x, short drw_y,
+ short src_w, short src_h,
+ short drw_w, short drw_h,
+ int id,
+ unsigned char *buf,
+ short width,
+ short height,
+ Bool sync,
+ RegionPtr clipBoxes);
+void glamor_xv_core_init(ScreenPtr screen);
+void glamor_xv_render(glamor_port_private *port_priv);
+
+#endif /* GLAMOR_XV_H */
diff --git a/hw/kdrive/ephyr/ephyr_glamor_xv.c b/hw/kdrive/ephyr/ephyr_glamor_xv.c
index 4dd15cf41..8a0653eaf 100644
--- a/hw/kdrive/ephyr/ephyr_glamor_xv.c
+++ b/hw/kdrive/ephyr/ephyr_glamor_xv.c
@@ -28,7 +28,7 @@
#include "kdrive.h"
#include "kxv.h"
#include "ephyr.h"
-#include "glamor_priv.h"
+#include "glamor_xv.h"
#include <X11/extensions/Xv.h>
#include "fourcc.h"
diff --git a/hw/xfree86/glamor_egl/glamor_xf86_xv.c b/hw/xfree86/glamor_egl/glamor_xf86_xv.c
index 8535fa0c9..5302ca06b 100644
--- a/hw/xfree86/glamor_egl/glamor_xf86_xv.c
+++ b/hw/xfree86/glamor_egl/glamor_xf86_xv.c
@@ -39,7 +39,7 @@
#endif
#define GLAMOR_FOR_XORG
-#include "glamor_priv.h"
+#include "glamor_xv.h"
#include <X11/extensions/Xv.h>
#include "fourcc.h"
diff --git a/hw/xwayland/xwayland-glamor-xv.c b/hw/xwayland/xwayland-glamor-xv.c
index 8e0f8da94..a13e1181b 100644
--- a/hw/xwayland/xwayland-glamor-xv.c
+++ b/hw/xwayland/xwayland-glamor-xv.c
@@ -31,7 +31,7 @@
*/
#include "xwayland.h"
-#include "glamor_priv.h"
+#include "glamor_xv.h"
#include <X11/extensions/Xv.h>
--
2.14.3
More information about the xorg-devel
mailing list