glamor: Remove _nf rendering functions
These were used by the non-standard glamor implementation in the intel driver. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
697f8581e0
commit
90d326fcc6
|
@ -34,6 +34,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "glamor_priv.h"
|
||||
#include "mipict.h"
|
||||
|
||||
DevPrivateKeyRec glamor_screen_private_key;
|
||||
DevPrivateKeyRec glamor_pixmap_private_key;
|
||||
|
@ -486,7 +487,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
|
|||
ps->AddTraps = glamor_add_traps;
|
||||
|
||||
glamor_priv->saved_procs.composite_rects = ps->CompositeRects;
|
||||
ps->CompositeRects = glamor_composite_rectangles;
|
||||
ps->CompositeRects = miCompositeRects;
|
||||
|
||||
glamor_priv->saved_procs.glyphs = ps->Glyphs;
|
||||
ps->Glyphs = glamor_glyphs;
|
||||
|
|
140
glamor/glamor.h
140
glamor/glamor.h
|
@ -308,146 +308,6 @@ extern _X_EXPORT void glamor_destroy_gc(GCPtr gc);
|
|||
extern Bool _X_EXPORT glamor_change_window_attributes(WindowPtr pWin, unsigned long mask);
|
||||
extern void _X_EXPORT glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_region);
|
||||
|
||||
/* Glamor rendering/drawing functions with XXX_nf.
|
||||
* nf means no fallback within glamor internal if possible. If glamor
|
||||
* fail to accelerate the operation, glamor will return a false, and the
|
||||
* caller need to implement fallback method. Return a true means the
|
||||
* rendering request get done successfully. */
|
||||
extern _X_EXPORT Bool glamor_fill_spans_nf(DrawablePtr drawable,
|
||||
GCPtr gc,
|
||||
int n, DDXPointPtr points,
|
||||
int *widths, int sorted);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_fill_rect_nf(DrawablePtr drawable,
|
||||
GCPtr gc,
|
||||
int nrect, xRectangle *prect);
|
||||
|
||||
extern _X_EXPORT Bool glamor_put_image_nf(DrawablePtr drawable,
|
||||
GCPtr gc, int depth, int x, int y,
|
||||
int w, int h, int left_pad,
|
||||
int image_format, char *bits);
|
||||
|
||||
extern _X_EXPORT Bool glamor_copy_n_to_n_nf(DrawablePtr src,
|
||||
DrawablePtr dst,
|
||||
GCPtr gc,
|
||||
BoxPtr box,
|
||||
int nbox,
|
||||
int dx,
|
||||
int dy,
|
||||
Bool reverse,
|
||||
Bool upsidedown, Pixel bitplane,
|
||||
void *closure);
|
||||
|
||||
extern _X_EXPORT Bool glamor_copy_nf(DrawablePtr src,
|
||||
DrawablePtr dst,
|
||||
GCPtr gc,
|
||||
BoxPtr box,
|
||||
int nbox,
|
||||
int dx,
|
||||
int dy,
|
||||
Bool reverse,
|
||||
Bool upsidedown, Pixel bitplane,
|
||||
void *closure);
|
||||
|
||||
extern _X_EXPORT Bool glamor_composite_nf(CARD8 op,
|
||||
PicturePtr source,
|
||||
PicturePtr mask,
|
||||
PicturePtr dest,
|
||||
INT16 x_source,
|
||||
INT16 y_source,
|
||||
INT16 x_mask,
|
||||
INT16 y_mask,
|
||||
INT16 x_dest, INT16 y_dest,
|
||||
CARD16 width, CARD16 height);
|
||||
|
||||
extern _X_EXPORT Bool glamor_trapezoids_nf(CARD8 op,
|
||||
PicturePtr src, PicturePtr dst,
|
||||
PictFormatPtr mask_format,
|
||||
INT16 x_src, INT16 y_src,
|
||||
int ntrap, xTrapezoid *traps);
|
||||
|
||||
extern _X_EXPORT Bool glamor_glyphs_nf(CARD8 op,
|
||||
PicturePtr src,
|
||||
PicturePtr dst,
|
||||
PictFormatPtr mask_format,
|
||||
INT16 x_src,
|
||||
INT16 y_src, int nlist,
|
||||
GlyphListPtr list, GlyphPtr *glyphs);
|
||||
|
||||
extern _X_EXPORT Bool glamor_triangles_nf(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc, INT16 ySrc,
|
||||
int ntris, xTriangle *tris);
|
||||
|
||||
extern _X_EXPORT void glamor_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph);
|
||||
|
||||
extern _X_EXPORT Bool glamor_set_spans_nf(DrawablePtr drawable, GCPtr gc,
|
||||
char *src, DDXPointPtr points,
|
||||
int *widths, int n, int sorted);
|
||||
|
||||
extern _X_EXPORT Bool glamor_get_spans_nf(DrawablePtr drawable, int wmax,
|
||||
DDXPointPtr points, int *widths,
|
||||
int count, char *dst);
|
||||
|
||||
extern _X_EXPORT Bool glamor_composite_rects_nf(CARD8 op,
|
||||
PicturePtr pDst,
|
||||
xRenderColor *color,
|
||||
int nRect, xRectangle *rects);
|
||||
|
||||
extern _X_EXPORT Bool glamor_get_image_nf(DrawablePtr pDrawable, int x, int y,
|
||||
int w, int h, unsigned int format,
|
||||
unsigned long planeMask, char *d);
|
||||
|
||||
extern _X_EXPORT Bool glamor_add_traps_nf(PicturePtr pPicture,
|
||||
INT16 x_off,
|
||||
INT16 y_off, int ntrap,
|
||||
xTrap *traps);
|
||||
|
||||
extern _X_EXPORT Bool glamor_copy_plane_nf(DrawablePtr pSrc, DrawablePtr pDst,
|
||||
GCPtr pGC, int srcx, int srcy, int w,
|
||||
int h, int dstx, int dsty,
|
||||
unsigned long bitPlane,
|
||||
RegionPtr *pRegion);
|
||||
|
||||
extern _X_EXPORT Bool glamor_image_glyph_blt_nf(DrawablePtr pDrawable,
|
||||
GCPtr pGC, int x, int y,
|
||||
unsigned int nglyph,
|
||||
CharInfoPtr *ppci,
|
||||
void *pglyphBase);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_glyph_blt_nf(DrawablePtr pDrawable, GCPtr pGC,
|
||||
int x, int y,
|
||||
unsigned int nglyph,
|
||||
CharInfoPtr *ppci,
|
||||
void *pglyphBase);
|
||||
|
||||
extern _X_EXPORT Bool glamor_push_pixels_nf(GCPtr pGC, PixmapPtr pBitmap,
|
||||
DrawablePtr pDrawable, int w, int h,
|
||||
int x, int y);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_point_nf(DrawablePtr pDrawable, GCPtr pGC,
|
||||
int mode, int npt, DDXPointPtr ppt);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_segment_nf(DrawablePtr pDrawable, GCPtr pGC,
|
||||
int nseg, xSegment *pSeg);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_lines_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int mode, int n, DDXPointPtr points);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_text8_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars, int *final_pos);
|
||||
|
||||
extern _X_EXPORT Bool glamor_poly_text16_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars, int *final_pos);
|
||||
|
||||
extern _X_EXPORT Bool glamor_image_text8_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars);
|
||||
|
||||
extern _X_EXPORT Bool glamor_image_text16_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars);
|
||||
|
||||
#define HAS_GLAMOR_TEXT 1
|
||||
|
||||
#ifdef GLAMOR_FOR_XORG
|
||||
|
|
|
@ -28,34 +28,13 @@
|
|||
|
||||
#include "glamor_priv.h"
|
||||
|
||||
static Bool
|
||||
_glamor_add_traps(PicturePtr pPicture,
|
||||
INT16 x_off,
|
||||
INT16 y_off, int ntrap, xTrap *traps, Bool fallback)
|
||||
void
|
||||
glamor_add_traps(PicturePtr pPicture,
|
||||
INT16 x_off,
|
||||
INT16 y_off, int ntrap, xTrap *traps)
|
||||
{
|
||||
if (!fallback
|
||||
&& (!pPicture->pDrawable
|
||||
|| glamor_ddx_fallback_check_pixmap(pPicture->pDrawable)))
|
||||
return FALSE;
|
||||
|
||||
if (glamor_prepare_access_picture(pPicture, GLAMOR_ACCESS_RW)) {
|
||||
fbAddTraps(pPicture, x_off, y_off, ntrap, traps);
|
||||
}
|
||||
glamor_finish_access_picture(pPicture);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
glamor_add_traps(PicturePtr pPicture,
|
||||
INT16 x_off, INT16 y_off, int ntrap, xTrap *traps)
|
||||
{
|
||||
_glamor_add_traps(pPicture, x_off, y_off, ntrap, traps, TRUE);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_add_traps_nf(PicturePtr pPicture,
|
||||
INT16 x_off, INT16 y_off, int ntrap, xTrap *traps)
|
||||
{
|
||||
return _glamor_add_traps(pPicture, x_off, y_off, ntrap, traps, FALSE);
|
||||
}
|
||||
|
|
|
@ -709,39 +709,3 @@ glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_regio
|
|||
|
||||
RegionUninit(&dst_region);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_copy_n_to_n_nf(DrawablePtr src,
|
||||
DrawablePtr dst,
|
||||
GCPtr gc,
|
||||
BoxPtr box,
|
||||
int nbox,
|
||||
int dx,
|
||||
int dy,
|
||||
Bool reverse,
|
||||
Bool upsidedown, Pixel bitplane,
|
||||
void *closure)
|
||||
{
|
||||
if (glamor_copy_gl(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure))
|
||||
return TRUE;
|
||||
if (glamor_ddx_fallback_check_pixmap(src) && glamor_ddx_fallback_check_pixmap(dst))
|
||||
return FALSE;
|
||||
glamor_copy_bail(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_copy_plane_nf(DrawablePtr src, DrawablePtr dst, GCPtr gc,
|
||||
int srcx, int srcy, int w, int h, int dstx, int dsty,
|
||||
unsigned long bitplane, RegionPtr *region)
|
||||
{
|
||||
if (glamor_ddx_fallback_check_pixmap(src) &&
|
||||
glamor_ddx_fallback_check_pixmap(dst) &&
|
||||
glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
|
||||
*region = glamor_copy_plane(src, dst, gc,
|
||||
srcx, srcy, w, h, dstx, dsty,
|
||||
bitplane);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -160,32 +160,6 @@ glamor_poly_glyph_blt(DrawablePtr drawable, GCPtr gc,
|
|||
ppci, pglyph_base);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_glyph_blt_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int start_x, int y, unsigned int nglyph,
|
||||
CharInfoPtr *ppci, void *pglyph_base)
|
||||
{
|
||||
if (glamor_poly_glyph_blt_gl(drawable, gc, start_x, y, nglyph, ppci,
|
||||
pglyph_base))
|
||||
return TRUE;
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) &&
|
||||
glamor_ddx_fallback_check_gc(gc)) {
|
||||
return FALSE;
|
||||
}
|
||||
miPolyGlyphBlt(drawable, gc, start_x, y, nglyph,
|
||||
ppci, pglyph_base);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_image_glyph_blt_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int start_x, int y, unsigned int nglyph,
|
||||
CharInfoPtr *ppci, void *pglyph_base)
|
||||
{
|
||||
miImageGlyphBlt(drawable, gc, start_x, y, nglyph, ppci, pglyph_base);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
glamor_push_pixels_gl(GCPtr gc, PixmapPtr bitmap,
|
||||
DrawablePtr drawable, int w, int h, int x, int y)
|
||||
|
@ -275,21 +249,3 @@ glamor_push_pixels(GCPtr pGC, PixmapPtr pBitmap,
|
|||
|
||||
miPushPixels(pGC, pBitmap, pDrawable, w, h, x, y);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_push_pixels_nf(GCPtr gc, PixmapPtr bitmap,
|
||||
DrawablePtr drawable, int w, int h, int x, int y)
|
||||
{
|
||||
if (glamor_push_pixels_gl(gc, bitmap, drawable, w, h, x, y))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) &&
|
||||
glamor_ddx_fallback_check_pixmap(&bitmap->drawable) &&
|
||||
glamor_ddx_fallback_check_gc(gc))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
miPushPixels(gc, bitmap, drawable, w, h, x, y);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -1166,11 +1166,9 @@ static void
|
|||
glamor_glyphs_flush_mask(struct glyphs_flush_mask_arg *arg)
|
||||
{
|
||||
if (arg->buffer->count > 0) {
|
||||
#ifdef RENDER
|
||||
glamor_composite_glyph_rects(PictOpAdd, arg->buffer->source,
|
||||
NULL, arg->mask,
|
||||
arg->buffer->count, arg->buffer->rects);
|
||||
#endif
|
||||
}
|
||||
arg->buffer->count = 0;
|
||||
arg->buffer->source = NULL;
|
||||
|
@ -1769,15 +1767,3 @@ glamor_glyphs(CARD8 op,
|
|||
_glamor_glyphs(op, src, dst, mask_format, x_src,
|
||||
y_src, nlist, list, glyphs, TRUE);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_glyphs_nf(CARD8 op,
|
||||
PicturePtr src,
|
||||
PicturePtr dst,
|
||||
PictFormatPtr mask_format,
|
||||
INT16 x_src,
|
||||
INT16 y_src, int nlist, GlyphListPtr list, GlyphPtr *glyphs)
|
||||
{
|
||||
return _glamor_glyphs(op, src, dst, mask_format, x_src,
|
||||
y_src, nlist, list, glyphs, FALSE);
|
||||
}
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
|
||||
#include "glamor_priv.h"
|
||||
|
||||
#ifdef RENDER
|
||||
|
||||
#define LINEAR_SMALL_STOPS (6 + 2)
|
||||
#define LINEAR_LARGE_STOPS (16 + 2)
|
||||
|
||||
|
@ -1473,5 +1471,3 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
|
|||
}
|
||||
|
||||
#endif /* End of GLAMOR_GRADIENT_SHADER */
|
||||
|
||||
#endif /* End of RENDER */
|
||||
|
|
|
@ -102,19 +102,6 @@ glamor_put_image(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
|
|||
glamor_put_image_bail(drawable, gc, depth, x, y, w, h, leftPad, format, bits);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_put_image_nf(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
|
||||
int w, int h, int leftPad, int format, char *bits)
|
||||
{
|
||||
if (glamor_put_image_gl(drawable, gc, depth, x, y, w, h, leftPad, format, bits))
|
||||
return TRUE;
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) &&
|
||||
glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
glamor_put_image_bail(drawable, gc, depth, x, y, w, h, leftPad, format, bits);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
glamor_get_image_gl(DrawablePtr drawable, int x, int y, int w, int h,
|
||||
unsigned int format, unsigned long plane_mask, char *d)
|
||||
|
@ -163,17 +150,3 @@ glamor_get_image(DrawablePtr drawable, int x, int y, int w, int h,
|
|||
return;
|
||||
glamor_get_image_bail(drawable, x, y, w, h, format, plane_mask, d);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_get_image_nf(DrawablePtr drawable, int x, int y, int w, int h,
|
||||
unsigned int format, unsigned long plane_mask, char *d)
|
||||
{
|
||||
if (glamor_get_image_gl(drawable, x, y, w, h, format, plane_mask, d))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable))
|
||||
return FALSE;
|
||||
|
||||
glamor_get_image_bail(drawable, x, y, w, h, format, plane_mask, d);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -167,21 +167,3 @@ glamor_poly_lines(DrawablePtr drawable, GCPtr gc,
|
|||
return;
|
||||
glamor_poly_lines_bail(drawable, gc, mode, n, points);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_lines_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int mode, int n, DDXPointPtr points)
|
||||
{
|
||||
if (glamor_poly_lines_gl(drawable, gc, mode, n, points))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) &&
|
||||
glamor_ddx_fallback_check_gc(gc))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
glamor_poly_lines_bail(drawable, gc, mode, n, points);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,18 +121,3 @@ glamor_poly_point(DrawablePtr drawable, GCPtr gc, int mode, int npt,
|
|||
return;
|
||||
miPolyPoint(drawable, gc, mode, npt, ppt);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_point_nf(DrawablePtr drawable, GCPtr gc, int mode, int npt,
|
||||
DDXPointPtr ppt)
|
||||
{
|
||||
if (glamor_poly_point_gl(drawable, gc, mode, npt, ppt))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
|
||||
miPolyPoint(drawable, gc, mode, npt, ppt);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,7 @@
|
|||
"precision mediump float;\n" \
|
||||
"#endif\n"
|
||||
|
||||
#ifdef RENDER
|
||||
#include "glyphstr.h"
|
||||
#endif
|
||||
|
||||
#include "glamor_debug.h"
|
||||
#include "glamor_context.h"
|
||||
|
@ -704,6 +702,7 @@ glamor_track_stipple(GCPtr gc);
|
|||
|
||||
/* glamor_glyphs.c */
|
||||
Bool glamor_realize_glyph_caches(ScreenPtr screen);
|
||||
void glamor_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph);
|
||||
void glamor_glyphs_fini(ScreenPtr screen);
|
||||
void glamor_glyphs(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
|
|
|
@ -173,15 +173,3 @@ glamor_poly_fill_rect(DrawablePtr drawable,
|
|||
return;
|
||||
glamor_poly_fill_rect_bail(drawable, gc, nrect, prect);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_fill_rect_nf(DrawablePtr drawable,
|
||||
GCPtr gc, int nrect, xRectangle *prect)
|
||||
{
|
||||
if (glamor_poly_fill_rect_gl(drawable, gc, nrect, prect))
|
||||
return TRUE;
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
glamor_poly_fill_rect_bail(drawable, gc, nrect, prect);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "glamor_priv.h"
|
||||
|
||||
#ifdef RENDER
|
||||
#include "mipict.h"
|
||||
#include "fbpict.h"
|
||||
#if 0
|
||||
|
@ -1560,17 +1559,16 @@ glamor_composite_clipped_region(CARD8 op,
|
|||
return ok;
|
||||
}
|
||||
|
||||
static Bool
|
||||
_glamor_composite(CARD8 op,
|
||||
PicturePtr source,
|
||||
PicturePtr mask,
|
||||
PicturePtr dest,
|
||||
INT16 x_source,
|
||||
INT16 y_source,
|
||||
INT16 x_mask,
|
||||
INT16 y_mask,
|
||||
INT16 x_dest, INT16 y_dest,
|
||||
CARD16 width, CARD16 height, Bool fallback)
|
||||
void
|
||||
glamor_composite(CARD8 op,
|
||||
PicturePtr source,
|
||||
PicturePtr mask,
|
||||
PicturePtr dest,
|
||||
INT16 x_source,
|
||||
INT16 y_source,
|
||||
INT16 x_mask,
|
||||
INT16 y_mask,
|
||||
INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height)
|
||||
{
|
||||
ScreenPtr screen = dest->pDrawable->pScreen;
|
||||
glamor_pixmap_private *dest_pixmap_priv;
|
||||
|
@ -1578,7 +1576,6 @@ _glamor_composite(CARD8 op,
|
|||
PixmapPtr dest_pixmap = glamor_get_drawable_pixmap(dest->pDrawable);
|
||||
PixmapPtr source_pixmap = NULL, mask_pixmap = NULL;
|
||||
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||
Bool ret = TRUE;
|
||||
RegionRec region;
|
||||
BoxPtr extent;
|
||||
int nbox, ok = FALSE;
|
||||
|
@ -1639,18 +1636,16 @@ _glamor_composite(CARD8 op,
|
|||
(mask_pixmap ? mask->pDrawable->y : 0),
|
||||
x_dest + dest->pDrawable->x,
|
||||
y_dest + dest->pDrawable->y, width, height)) {
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
return;
|
||||
}
|
||||
|
||||
nbox = REGION_NUM_RECTS(®ion);
|
||||
DEBUGF("first clipped when compositing.\n");
|
||||
DEBUGRegionPrint(®ion);
|
||||
extent = RegionExtents(®ion);
|
||||
if (nbox == 0) {
|
||||
ret = TRUE;
|
||||
goto done;
|
||||
}
|
||||
if (nbox == 0)
|
||||
return;
|
||||
|
||||
/* If destination is not a large pixmap, but the region is larger
|
||||
* than texture size limitation, and source or mask is memory pixmap,
|
||||
* then there may be need to load a large memory pixmap to a
|
||||
|
@ -1698,17 +1693,9 @@ _glamor_composite(CARD8 op,
|
|||
REGION_UNINIT(dest->pDrawable->pScreen, ®ion);
|
||||
|
||||
if (ok)
|
||||
goto done;
|
||||
fail:
|
||||
return;
|
||||
|
||||
if (!fallback && glamor_ddx_fallback_check_pixmap(&dest_pixmap->drawable)
|
||||
&& (!source_pixmap
|
||||
|| glamor_ddx_fallback_check_pixmap(&source_pixmap->drawable))
|
||||
&& (!mask_pixmap
|
||||
|| glamor_ddx_fallback_check_pixmap(&mask_pixmap->drawable))) {
|
||||
ret = FALSE;
|
||||
goto done;
|
||||
}
|
||||
fail:
|
||||
|
||||
glamor_fallback
|
||||
("from picts %p:%p %dx%d / %p:%p %d x %d (%c,%c) to pict %p:%p %dx%d (%c)\n",
|
||||
|
@ -1739,40 +1726,6 @@ _glamor_composite(CARD8 op,
|
|||
glamor_finish_access_picture(mask);
|
||||
glamor_finish_access_picture(source);
|
||||
glamor_finish_access_picture(dest);
|
||||
|
||||
done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
glamor_composite(CARD8 op,
|
||||
PicturePtr source,
|
||||
PicturePtr mask,
|
||||
PicturePtr dest,
|
||||
INT16 x_source,
|
||||
INT16 y_source,
|
||||
INT16 x_mask,
|
||||
INT16 y_mask,
|
||||
INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height)
|
||||
{
|
||||
_glamor_composite(op, source, mask, dest, x_source, y_source,
|
||||
x_mask, y_mask, x_dest, y_dest, width, height, TRUE);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_composite_nf(CARD8 op,
|
||||
PicturePtr source,
|
||||
PicturePtr mask,
|
||||
PicturePtr dest,
|
||||
INT16 x_source,
|
||||
INT16 y_source,
|
||||
INT16 x_mask,
|
||||
INT16 y_mask,
|
||||
INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height)
|
||||
{
|
||||
return _glamor_composite(op, source, mask, dest, x_source, y_source,
|
||||
x_mask, y_mask, x_dest, y_dest, width, height,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1900,31 +1853,3 @@ glamor_composite_glyph_rects(CARD8 op,
|
|||
if (temp_src && temp_src != src)
|
||||
FreePicture(temp_src, 0);
|
||||
}
|
||||
|
||||
static Bool
|
||||
_glamor_composite_rects(CARD8 op,
|
||||
PicturePtr pDst,
|
||||
xRenderColor *color,
|
||||
int nRect, xRectangle *rects, Bool fallback)
|
||||
{
|
||||
miCompositeRects(op, pDst, color, nRect, rects);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
glamor_composite_rects(CARD8 op,
|
||||
PicturePtr pDst,
|
||||
xRenderColor *color, int nRect, xRectangle *rects)
|
||||
{
|
||||
_glamor_composite_rects(op, pDst, color, nRect, rects, TRUE);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_composite_rects_nf(CARD8 op,
|
||||
PicturePtr pDst,
|
||||
xRenderColor *color, int nRect, xRectangle *rects)
|
||||
{
|
||||
return _glamor_composite_rects(op, pDst, color, nRect, rects, FALSE);
|
||||
}
|
||||
|
||||
#endif /* RENDER */
|
||||
|
|
|
@ -168,21 +168,3 @@ glamor_poly_segment(DrawablePtr drawable, GCPtr gc,
|
|||
|
||||
glamor_poly_segment_bail(drawable, gc, nseg, segs);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_segment_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int nseg, xSegment *segs)
|
||||
{
|
||||
if (glamor_poly_segment_gl(drawable, gc, nseg, segs))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) &&
|
||||
glamor_ddx_fallback_check_gc(gc))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
glamor_poly_segment_bail(drawable, gc, nseg, segs);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,21 +182,6 @@ glamor_fill_spans(DrawablePtr drawable,
|
|||
glamor_fill_spans_bail(drawable, gc, n, points, widths, sorted);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_fill_spans_nf(DrawablePtr drawable,
|
||||
GCPtr gc,
|
||||
int n, DDXPointPtr points, int *widths, int sorted)
|
||||
{
|
||||
if (glamor_fill_spans_gl(drawable, gc, n, points, widths, sorted))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
|
||||
glamor_fill_spans_bail(drawable, gc, n, points, widths, sorted);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
glamor_get_spans_gl(DrawablePtr drawable, int wmax,
|
||||
DDXPointPtr points, int *widths, int count, char *dst)
|
||||
|
@ -282,20 +267,6 @@ glamor_get_spans(DrawablePtr drawable, int wmax,
|
|||
glamor_get_spans_bail(drawable, wmax, points, widths, count, dst);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_get_spans_nf(DrawablePtr drawable, int wmax,
|
||||
DDXPointPtr points, int *widths, int count, char *dst)
|
||||
{
|
||||
if (glamor_get_spans_gl(drawable, wmax, points, widths, count, dst))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable))
|
||||
return FALSE;
|
||||
|
||||
glamor_get_spans_bail(drawable, wmax, points, widths, count, dst);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
glamor_set_spans_gl(DrawablePtr drawable, GCPtr gc, char *src,
|
||||
DDXPointPtr points, int *widths, int numPoints, int sorted)
|
||||
|
@ -415,17 +386,3 @@ glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src,
|
|||
return;
|
||||
glamor_set_spans_bail(drawable, gc, src, points, widths, numPoints, sorted);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_set_spans_nf(DrawablePtr drawable, GCPtr gc, char *src,
|
||||
DDXPointPtr points, int *widths, int numPoints, int sorted)
|
||||
{
|
||||
if (glamor_set_spans_gl(drawable, gc, src, points, widths, numPoints, sorted))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
|
||||
glamor_set_spans_bail(drawable, gc, src, points, widths, numPoints, sorted);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -302,18 +302,6 @@ bail:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_text8_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars, int *final_pos)
|
||||
{
|
||||
if (glamor_poly_text(drawable, gc, x, y, count, chars, FALSE, final_pos))
|
||||
return TRUE;
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
*final_pos = miPolyText8(drawable, gc, x, y, count, chars);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
glamor_poly_text8(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars)
|
||||
|
@ -325,19 +313,6 @@ glamor_poly_text8(DrawablePtr drawable, GCPtr gc,
|
|||
return miPolyText8(drawable, gc, x, y, count, chars);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_poly_text16_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars, int *final_pos)
|
||||
{
|
||||
if (glamor_poly_text(drawable, gc, x, y, count, (char *) chars, TRUE, final_pos))
|
||||
return TRUE;
|
||||
|
||||
if (glamor_ddx_fallback_check_pixmap(drawable) && glamor_ddx_fallback_check_gc(gc))
|
||||
return FALSE;
|
||||
*final_pos = miPolyText16(drawable, gc, x, y, count, chars);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
glamor_poly_text16(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars)
|
||||
|
@ -497,13 +472,6 @@ bail:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_image_text8_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars)
|
||||
{
|
||||
return glamor_image_text(drawable, gc, x, y, count, chars, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
glamor_image_text8(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, char *chars)
|
||||
|
@ -512,13 +480,6 @@ glamor_image_text8(DrawablePtr drawable, GCPtr gc,
|
|||
miImageText8(drawable, gc, x, y, count, chars);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_image_text16_nf(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars)
|
||||
{
|
||||
return glamor_image_text(drawable, gc, x, y, count, (char *) chars, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
glamor_image_text16(DrawablePtr drawable, GCPtr gc,
|
||||
int x, int y, int count, unsigned short *chars)
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "glamor_priv.h"
|
||||
|
||||
#ifdef RENDER
|
||||
#include "mipict.h"
|
||||
#include "fbpict.h"
|
||||
|
||||
|
@ -155,18 +154,3 @@ glamor_trapezoids(CARD8 op,
|
|||
|
||||
FreePicture(picture, 0);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_trapezoids_nf(CARD8 op,
|
||||
PicturePtr src, PicturePtr dst,
|
||||
PictFormatPtr mask_format, INT16 x_src, INT16 y_src,
|
||||
int ntrap, xTrapezoid *traps)
|
||||
{
|
||||
DEBUGF("x_src = %d, y_src = %d, ntrap = %d\n", x_src, y_src, ntrap);
|
||||
|
||||
glamor_trapezoids(op, src, dst, mask_format, x_src,
|
||||
y_src, ntrap, traps);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* RENDER */
|
||||
|
|
|
@ -28,29 +28,6 @@
|
|||
|
||||
#include "glamor_priv.h"
|
||||
|
||||
static Bool
|
||||
_glamor_triangles(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris,
|
||||
Bool fallback)
|
||||
{
|
||||
if (!fallback && glamor_ddx_fallback_check_pixmap(pDst->pDrawable)
|
||||
&& (!pSrc->pDrawable
|
||||
|| glamor_ddx_fallback_check_pixmap(pSrc->pDrawable)))
|
||||
return FALSE;
|
||||
|
||||
if (glamor_prepare_access_picture(pDst, GLAMOR_ACCESS_RW) &&
|
||||
glamor_prepare_access_picture(pSrc, GLAMOR_ACCESS_RO)) {
|
||||
fbTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, tris);
|
||||
}
|
||||
glamor_finish_access_picture(pSrc);
|
||||
glamor_finish_access_picture(pDst);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
glamor_triangles(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
|
@ -58,17 +35,10 @@ glamor_triangles(CARD8 op,
|
|||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris)
|
||||
{
|
||||
_glamor_triangles(op, pSrc, pDst, maskFormat,
|
||||
xSrc, ySrc, ntris, tris, TRUE);
|
||||
}
|
||||
|
||||
Bool
|
||||
glamor_triangles_nf(CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pDst,
|
||||
PictFormatPtr maskFormat,
|
||||
INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris)
|
||||
{
|
||||
return _glamor_triangles(op, pSrc, pDst, maskFormat,
|
||||
xSrc, ySrc, ntris, tris, FALSE);
|
||||
if (glamor_prepare_access_picture(pDst, GLAMOR_ACCESS_RW) &&
|
||||
glamor_prepare_access_picture(pSrc, GLAMOR_ACCESS_RO)) {
|
||||
fbTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, tris);
|
||||
}
|
||||
glamor_finish_access_picture(pSrc);
|
||||
glamor_finish_access_picture(pDst);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue