Lines Matching refs:pDraw

140 destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, int prime_id);
217 DRI2GetDrawable(DrawablePtr pDraw) in DRI2GetDrawable() argument
222 switch (pDraw->type) { in DRI2GetDrawable()
224 pWin = (WindowPtr) pDraw; in DRI2GetDrawable()
227 pPixmap = (PixmapPtr) pDraw; in DRI2GetDrawable()
235 DRI2AllocateDrawable(DrawablePtr pDraw) in DRI2AllocateDrawable() argument
237 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2AllocateDrawable()
248 pPriv->drawable = pDraw; in DRI2AllocateDrawable()
249 pPriv->width = pDraw->width; in DRI2AllocateDrawable()
250 pPriv->height = pDraw->height; in DRI2AllocateDrawable()
258 if (!ds->GetMSC || !(*ds->GetMSC) (pDraw, &ust, &pPriv->last_swap_target)) in DRI2AllocateDrawable()
269 if (pDraw->type == DRAWABLE_WINDOW) { in DRI2AllocateDrawable()
270 pWin = (WindowPtr) pDraw; in DRI2AllocateDrawable()
274 pPixmap = (PixmapPtr) pDraw; in DRI2AllocateDrawable()
282 DRI2SwapLimit(DrawablePtr pDraw, int swap_limit) in DRI2SwapLimit() argument
284 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); in DRI2SwapLimit()
292 if (!ds->SwapLimitValidate || !ds->SwapLimitValidate(pDraw, swap_limit)) in DRI2SwapLimit()
357 DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id, in DRI2CreateDrawable2() argument
366 pPriv = DRI2GetDrawable(pDraw); in DRI2CreateDrawable2()
368 pPriv = DRI2AllocateDrawable(pDraw); in DRI2CreateDrawable2()
386 DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id, in DRI2CreateDrawable() argument
389 return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL); in DRI2CreateDrawable()
399 DrawablePtr pDraw; in DRI2DrawableGone() local
423 pDraw = pPriv->drawable; in DRI2DrawableGone()
424 if (pDraw->type == DRAWABLE_WINDOW) { in DRI2DrawableGone()
425 pWin = (WindowPtr) pDraw; in DRI2DrawableGone()
429 pPixmap = (PixmapPtr) pDraw; in DRI2DrawableGone()
440 destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id); in DRI2DrawableGone()
446 (*pDraw->pScreen->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE); in DRI2DrawableGone()
447 (*pDraw->pScreen->DestroyPixmap)(pPriv->redirectpixmap); in DRI2DrawableGone()
460 create_buffer(DRI2ScreenPtr ds, DrawablePtr pDraw, in create_buffer() argument
465 buffer = (*ds->CreateBuffer2)(GetScreenPrime(pDraw->pScreen, in create_buffer()
466 DRI2GetDrawable(pDraw)->prime_id), in create_buffer()
467 pDraw, attachment, format); in create_buffer()
469 buffer = (*ds->CreateBuffer)(pDraw, attachment, format); in create_buffer()
474 destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, int prime_id) in destroy_buffer() argument
478 primeScreen = GetScreenPrime(pDraw->pScreen, prime_id); in destroy_buffer()
481 (*ds->DestroyBuffer2)(primeScreen, pDraw, buffer); in destroy_buffer()
483 (*ds->DestroyBuffer)(pDraw, buffer); in destroy_buffer()
506 allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, in allocate_or_reuse_buffer() argument
516 *buffer = create_buffer(ds, pDraw, attachment, format); in allocate_or_reuse_buffer()
524 (*ds->ReuseBufferNotify) (pDraw, *buffer); in allocate_or_reuse_buffer()
532 update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, in update_dri2_drawable_buffers() argument
541 destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id); in update_dri2_drawable_buffers()
550 pPriv->width = pDraw->width; in update_dri2_drawable_buffers()
551 pPriv->height = pDraw->height; in update_dri2_drawable_buffers()
557 do_get_buffers(DrawablePtr pDraw, int *width, int *height, in do_get_buffers() argument
561 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); in do_get_buffers()
573 *width = pDraw->width; in do_get_buffers()
574 *height = pDraw->height; in do_get_buffers()
579 ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id); in do_get_buffers()
581 dimensions_match = (pDraw->width == pPriv->width) in do_get_buffers()
582 && (pDraw->height == pPriv->height); in do_get_buffers()
592 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, in do_get_buffers()
613 if (pDraw->type == DRAWABLE_WINDOW) { in do_get_buffers()
618 if (pDraw->type == DRAWABLE_WINDOW) { in do_get_buffers()
627 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft, in do_get_buffers()
638 if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft, in do_get_buffers()
652 update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, in do_get_buffers()
669 DRI2CopyRegion(pDraw, &region, DRI2BufferFakeFrontLeft, in do_get_buffers()
684 destroy_buffer(pDraw, buffers[i], 0); in do_get_buffers()
691 update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, in do_get_buffers()
698 DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, in DRI2GetBuffers() argument
701 return do_get_buffers(pDraw, width, height, attachments, count, in DRI2GetBuffers()
706 DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, in DRI2GetBuffersWithFormat() argument
709 return do_get_buffers(pDraw, width, height, attachments, count, in DRI2GetBuffersWithFormat()
714 DRI2InvalidateDrawable(DrawablePtr pDraw) in DRI2InvalidateDrawable() argument
716 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); in DRI2InvalidateDrawable()
725 ref->invalidate(pDraw, ref->priv, ref->id); in DRI2InvalidateDrawable()
736 DRI2ThrottleClient(ClientPtr client, DrawablePtr pDraw) in DRI2ThrottleClient() argument
740 pPriv = DRI2GetDrawable(pDraw); in DRI2ThrottleClient()
757 DRI2BlockClient(ClientPtr client, DrawablePtr pDraw) in DRI2BlockClient() argument
761 pPriv = DRI2GetDrawable(pDraw); in DRI2BlockClient()
792 DRI2InvalidateDrawableAll(DrawablePtr pDraw) in DRI2InvalidateDrawableAll() argument
794 if (pDraw->type == DRAWABLE_WINDOW) { in DRI2InvalidateDrawableAll()
795 WindowPtr pWin = (WindowPtr) pDraw; in DRI2InvalidateDrawableAll()
796 PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); in DRI2InvalidateDrawableAll()
802 pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap) in DRI2InvalidateDrawableAll()
813 DRI2InvalidateDrawable(pDraw); in DRI2InvalidateDrawableAll()
816 DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) in DRI2UpdatePrime() argument
818 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); in DRI2UpdatePrime()
820 PixmapPtr mpix = GetDrawablePixmap(pDraw); in DRI2UpdatePrime()
826 if (pDraw->type == DRAWABLE_WINDOW) { in DRI2UpdatePrime()
827 WindowPtr pWin = (WindowPtr)pDraw; in DRI2UpdatePrime()
828 PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); in DRI2UpdatePrime()
830 if (pDraw->pScreen->GetScreenPixmap(pDraw->pScreen) == pPixmap) { in DRI2UpdatePrime()
832 pPriv->redirectpixmap->drawable.width == pDraw->width && in DRI2UpdatePrime()
833 pPriv->redirectpixmap->drawable.height == pDraw->height && in DRI2UpdatePrime()
834 pPriv->redirectpixmap->drawable.depth == pDraw->depth) { in DRI2UpdatePrime()
838 mpix = (*master->CreatePixmap)(master, pDraw->width, pDraw->height, in DRI2UpdatePrime()
839 pDraw->depth, CREATE_PIXMAP_USAGE_SHARED); in DRI2UpdatePrime()
843 ret = (*master->ReplaceScanoutPixmap)(pDraw, mpix, TRUE); in DRI2UpdatePrime()
853 (*master->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE); in DRI2UpdatePrime()
859 slave = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); in DRI2UpdatePrime()
883 DRI2InvalidateDrawableAll(pDraw); in DRI2UpdatePrime()
887 static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, in dri2_copy_region() argument
890 DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); in dri2_copy_region()
894 primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); in dri2_copy_region()
898 (*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc); in dri2_copy_region()
900 (*ds->CopyRegion) (pDraw, pRegion, pDest, pSrc); in dri2_copy_region()
907 box.x2 = box.x1 + pDraw->width; in dri2_copy_region()
909 box.y2 = box.y1 + pDraw->height; in dri2_copy_region()
911 RegionTranslate(&region, pDraw->x, pDraw->y); in dri2_copy_region()
912 DamageRegionAppend(pDraw, &region); in dri2_copy_region()
913 DamageRegionProcessPending(pDraw); in dri2_copy_region()
919 DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, in DRI2CopyRegion() argument
926 pPriv = DRI2GetDrawable(pDraw); in DRI2CopyRegion()
941 dri2_copy_region(pDraw, pRegion, pDestBuffer, pSrcBuffer); in DRI2CopyRegion()
948 DRI2CanFlip(DrawablePtr pDraw) in DRI2CanFlip() argument
950 ScreenPtr pScreen = pDraw->pScreen; in DRI2CanFlip()
954 if (pDraw->type == DRAWABLE_PIXMAP) in DRI2CanFlip()
960 pWin = (WindowPtr) pDraw; in DRI2CanFlip()
968 if (pDraw->x != 0 || pDraw->y != 0 || in DRI2CanFlip()
970 pDraw->x != pWinPixmap->screen_x || pDraw->y != pWinPixmap->screen_y || in DRI2CanFlip()
972 pDraw->width != pWinPixmap->drawable.width || in DRI2CanFlip()
973 pDraw->height != pWinPixmap->drawable.height) in DRI2CanFlip()
981 DRI2CanExchange(DrawablePtr pDraw) in DRI2CanExchange() argument
987 DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw, int frame, in DRI2WaitMSCComplete() argument
992 pPriv = DRI2GetDrawable(pDraw); in DRI2WaitMSCComplete()
1003 DRI2WakeClient(ClientPtr client, DrawablePtr pDraw, int frame, in DRI2WakeClient() argument
1006 ScreenPtr pScreen = pDraw->pScreen; in DRI2WakeClient()
1009 pPriv = DRI2GetDrawable(pDraw); in DRI2WakeClient()
1036 DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, in DRI2SwapComplete() argument
1040 ScreenPtr pScreen = pDraw->pScreen; in DRI2SwapComplete()
1046 pPriv = DRI2GetDrawable(pDraw); in DRI2SwapComplete()
1058 box.x2 = pDraw->width; in DRI2SwapComplete()
1059 box.y2 = pDraw->height; in DRI2SwapComplete()
1061 DRI2CopyRegion(pDraw, &region, DRI2BufferFakeFrontLeft, in DRI2SwapComplete()
1071 DRI2WakeClient(client, pDraw, frame, tv_sec, tv_usec); in DRI2SwapComplete()
1095 DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, in DRI2SwapBuffers() argument
1099 ScreenPtr pScreen = pDraw->pScreen; in DRI2SwapBuffers()
1100 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2SwapBuffers()
1106 pPriv = DRI2GetDrawable(pDraw); in DRI2SwapBuffers()
1140 box.x2 = pDraw->width; in DRI2SwapBuffers()
1141 box.y2 = pDraw->height; in DRI2SwapBuffers()
1146 dri2_copy_region(pDraw, &region, pDestBuffer, pSrcBuffer); in DRI2SwapBuffers()
1147 DRI2SwapComplete(client, pDraw, target_msc, 0, 0, DRI2_BLIT_COMPLETE, in DRI2SwapBuffers()
1165 if (!(*ds->GetMSC) (pDraw, &ust, &current_msc)) in DRI2SwapBuffers()
1183 ret = (*ds->ScheduleSwap) (client, pDraw, pDestBuffer, pSrcBuffer, in DRI2SwapBuffers()
1194 DRI2InvalidateDrawableAll(pDraw); in DRI2SwapBuffers()
1216 DRI2GetMSC(DrawablePtr pDraw, CARD64 * ust, CARD64 * msc, CARD64 * sbc) in DRI2GetMSC() argument
1218 ScreenPtr pScreen = pDraw->pScreen; in DRI2GetMSC()
1219 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2GetMSC()
1223 pPriv = DRI2GetDrawable(pDraw); in DRI2GetMSC()
1242 ret = (*ds->GetMSC) (pDraw, ust, msc); in DRI2GetMSC()
1252 DRI2WaitMSC(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, in DRI2WaitMSC() argument
1255 DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); in DRI2WaitMSC()
1259 pPriv = DRI2GetDrawable(pDraw); in DRI2WaitMSC()
1265 DRI2WaitMSCComplete(client, pDraw, target_msc, 0, 0); in DRI2WaitMSC()
1271 (*ds->ScheduleWaitMSC) (client, pDraw, target_msc, divisor, remainder); in DRI2WaitMSC()
1279 DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc) in DRI2WaitSBC() argument
1283 pPriv = DRI2GetDrawable(pDraw); in DRI2WaitSBC()
1385 DrawablePtr pDraw = (DrawablePtr) pWin; in DRI2ConfigNotify() local
1386 ScreenPtr pScreen = pDraw->pScreen; in DRI2ConfigNotify()
1388 DRI2DrawablePtr dd = DRI2GetDrawable(pDraw); in DRI2ConfigNotify()
1405 DRI2InvalidateDrawable(pDraw); in DRI2ConfigNotify()