vmwgfx/vmwgfx_output.c
Bool
vmwgfx_output_explicit_overlap(ScrnInfoPtr pScrn)
{
    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
    xf86OutputPtr output;
    ScreenPtr pScreen = pScrn->pScreen;
    RegionRec output_union;
    RegionRec cur_output;
    RegionRec result;
    struct output_private *priv;
    xf86CrtcPtr crtc;
    Bool overlap = FALSE;
    int i;

    (void) pScreen;
    REGION_NULL(pScreen, &output_union);
    REGION_NULL(pScreen, &cur_output);
    REGION_NULL(pScreen, &result);

    /*
     * Collect a region of implicit outputs. These may overlap.
     */
    for (i = 0; i < config->num_output; i++) {
	output = config->output[i];
	priv = output->driver_private;
	crtc = output->crtc;

	if (!crtc || !crtc->enabled || !priv->is_implicit)
	    continue;

	REGION_RESET(pScreen, &cur_output, &crtc->bounds);
	REGION_UNION(pScreen, &output_union, &output_union, &cur_output);
    }

    /*
     * Explicit outputs may not overlap any other output.
     */
    for (i = 0; i < config->num_output; i++) {
	output = config->output[i];
	priv = output->driver_private;
	crtc = output->crtc;

	if (!crtc || !crtc->enabled || priv->is_implicit)
	    continue;

	REGION_RESET(pScreen, &cur_output, &crtc->bounds);
	REGION_NULL(pScreen, &result);
	REGION_INTERSECT(pScreen, &result, &output_union, &cur_output);
	overlap = REGION_NOTEMPTY(vsaa->pScreen, &result);
	if (overlap)
	    break;

	REGION_UNION(pScreen, &output_union, &output_union, &cur_output);
    }

    REGION_UNINIT(pScreen, &output_union);
    REGION_UNINIT(pScreen, &cur_output);
    REGION_UNINIT(pScreen, &result);

    return overlap;
}
/**
 * vmwgfx_output_explicit_overlap -- Check for explicit output overlaps
 *
 * This function returns TRUE iff the bounding box in screen space of an
 * exlplicit output overlaps the bounding box in screen space of any other
 * output.
 */
- Check for explicit output overlaps
This function returns TRUE iff the bounding box in screen space of an
exlplicit output overlaps the bounding box in screen space of any other
output.
- Check for explicit output overlaps This function returns TRUE iff the bounding box in screen space of an exlplicit output overlaps the bounding box in screen space of any other output .
Bool
vmwgfx_output_explicit_overlap(ScrnInfoPtr pScrn)
{
    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
    xf86OutputPtr output;
    ScreenPtr pScreen = pScrn->pScreen;
    RegionRec output_union;
    RegionRec cur_output;
    RegionRec result;
    struct output_private *priv;
    xf86CrtcPtr crtc;
    Bool overlap = FALSE;
    int i;
    (void) pScreen;
    REGION_NULL(pScreen, &output_union);
    REGION_NULL(pScreen, &cur_output);
    REGION_NULL(pScreen, &result);
    for (i = 0; i < config->num_output; i++) {
	output = config->output[i];
	priv = output->driver_private;
	crtc = output->crtc;
	if (!crtc || !crtc->enabled || !priv->is_implicit)
	    continue;
	REGION_RESET(pScreen, &cur_output, &crtc->bounds);
	REGION_UNION(pScreen, &output_union, &output_union, &cur_output);
    }
    for (i = 0; i < config->num_output; i++) {
	output = config->output[i];
	priv = output->driver_private;
	crtc = output->crtc;
	if (!crtc || !crtc->enabled || priv->is_implicit)
	    continue;
	REGION_RESET(pScreen, &cur_output, &crtc->bounds);
	REGION_NULL(pScreen, &result);
	REGION_INTERSECT(pScreen, &result, &output_union, &cur_output);
	overlap = REGION_NOTEMPTY(vsaa->pScreen, &result);
	if (overlap)
	    break;
	REGION_UNION(pScreen, &output_union, &output_union, &cur_output);
    }
    REGION_UNINIT(pScreen, &output_union);
    REGION_UNINIT(pScreen, &cur_output);
    REGION_UNINIT(pScreen, &result);
    return overlap;
}
Bool vmwgfx_output_explicit_overlap ( ScrnInfoPtr pScrn ) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR ( pScrn ) ; xf86OutputPtr output ; ScreenPtr pScreen = pScrn -> pScreen ; RegionRec output_union ; RegionRec cur_output ; RegionRec result ; struct output_private * priv ; xf86CrtcPtr crtc ; Bool overlap = FALSE ; int i ; ( void ) pScreen ; REGION_NULL ( pScreen , & output_union ) ; REGION_NULL ( pScreen , & cur_output ) ; REGION_NULL ( pScreen , & result ) ; for ( i = 0 ; i < config -> num_output ; i ++ ) { output = config -> output [ i ] ; priv = output -> driver_private ; crtc = output -> crtc ; if ( ! crtc || ! crtc -> enabled || ! priv -> is_implicit ) continue ; REGION_RESET ( pScreen , & cur_output , & crtc -> bounds ) ; REGION_UNION ( pScreen , & output_union , & output_union , & cur_output ) ; } for ( i = 0 ; i < config -> num_output ; i ++ ) { output = config -> output [ i ] ; priv = output -> driver_private ; crtc = output -> crtc ; if ( ! crtc || ! crtc -> enabled || priv -> is_implicit ) continue ; REGION_RESET ( pScreen , & cur_output , & crtc -> bounds ) ; REGION_NULL ( pScreen , & result ) ; REGION_INTERSECT ( pScreen , & result , & output_union , & cur_output ) ; overlap = REGION_NOTEMPTY ( vsaa -> pScreen , & result ) ; if ( overlap ) break ; REGION_UNION ( pScreen , & output_union , & output_union , & cur_output ) ; } REGION_UNINIT ( pScreen , & output_union ) ; REGION_UNINIT ( pScreen , & cur_output ) ; REGION_UNINIT ( pScreen , & result ) ; return overlap ; }
vmwgfx_output_explicit_overlap -- Check for explicit output overlaps
 This function returns TRUE iff the bounding box in screen space of an
 exlplicit output overlaps the bounding box in screen space of any other
 output.
vmwgfx_output_explicit_overlap -- Check for explicit output overlaps This function returns TRUE iff the bounding box in screen space of an exlplicit output overlaps the bounding box in screen space of any other output .
/*
     * Collect a region of implicit outputs. These may overlap.
     */ /*
     * Explicit outputs may not overlap any other output.
     */