static Bool can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); NVPtr pNv = NVPTR(scrn); int i, active_crtc_count = 0; if (!xf86_config->num_crtc) return FALSE; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (drmmode_crtc_on(crtc)) { if (crtc->rotatedData) return FALSE; active_crtc_count++; } } return ((DRI2CanFlip(draw) && pNv->has_pageflip)) && dst_pix->drawable.width == src_pix->drawable.width && dst_pix->drawable.height == src_pix->drawable.height && dst_pix->drawable.bitsPerPixel == src_pix->drawable.bitsPerPixel && dst_pix->devKind == src_pix->devKind && active_crtc_count; }
static inline Bool canexchange(DrawablePtr pDraw, DRI2BufferPtr a, DRI2BufferPtr b) { DrawablePtr da = dri2draw(pDraw, a); DrawablePtr db = dri2draw(pDraw, b); return DRI2CanFlip(pDraw) && (da->width == db->width) && (da->height == db->height) && (da->depth == db->depth); }
static Bool canflip(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); if (pARMSOC->NoFlip) { /* flipping is disabled by user option */ return FALSE; } else { return (pDraw->type == DRAWABLE_WINDOW) && DRI2CanFlip(pDraw); } }
static Bool can_exchange(DrawablePtr drawable, DRI2BufferPtr front, DRI2BufferPtr back) { PixmapPtr front_pix = vivante_dri2_get_pixmap(front); PixmapPtr back_pix = vivante_dri2_get_pixmap(back); if (!DRI2CanFlip(drawable)) return FALSE; /* Front and back must be the same size and bpp */ if (front_pix->drawable.width != back_pix->drawable.width || front_pix->drawable.height != back_pix->drawable.height || front_pix->drawable.bitsPerPixel != back_pix->drawable.bitsPerPixel) return FALSE; return TRUE; }
static Bool canflip(DrawablePtr pDraw) { return (pDraw->type == DRAWABLE_WINDOW) && DRI2CanFlip(pDraw); }