Lines Matching refs:pdraw

134    struct dri2_drawable *pdraw, *pread;  in dri2_bind_context()  local
139 pdraw = (struct dri2_drawable *) driFetchDrawable(context, draw); in dri2_bind_context()
144 if (pdraw) in dri2_bind_context()
145 dri_draw = pdraw->driDrawable; in dri2_bind_context()
161 if (!pdp->invalidateAvailable && pdraw) { in dri2_bind_context()
162 dri2InvalidateBuffers(psc->base.dpy, pdraw->base.xDrawable); in dri2_bind_context()
163 if (pread != pdraw && pread) in dri2_bind_context()
344 struct dri2_drawable *pdraw = (struct dri2_drawable *) base; in dri2DestroyDrawable() local
348 __glxHashDelete(pdp->dri2Hash, pdraw->base.xDrawable); in dri2DestroyDrawable()
349 (*psc->core->destroyDrawable) (pdraw->driDrawable); in dri2DestroyDrawable()
358 if (pdraw->base.xDrawable != pdraw->base.drawable) in dri2DestroyDrawable()
359 DRI2DestroyDrawable(psc->base.dpy, pdraw->base.xDrawable); in dri2DestroyDrawable()
361 free(pdraw); in dri2DestroyDrawable()
368 struct dri2_drawable *pdraw; in dri2CreateDrawable() local
379 pdraw = calloc(1, sizeof(*pdraw)); in dri2CreateDrawable()
380 if (!pdraw) in dri2CreateDrawable()
383 pdraw->base.destroyDrawable = dri2DestroyDrawable; in dri2CreateDrawable()
384 pdraw->base.xDrawable = xDrawable; in dri2CreateDrawable()
385 pdraw->base.drawable = drawable; in dri2CreateDrawable()
386 pdraw->base.psc = &psc->base; in dri2CreateDrawable()
387 pdraw->bufferCount = 0; in dri2CreateDrawable()
388 pdraw->swap_interval = 1; /* default may be overridden below */ in dri2CreateDrawable()
389 pdraw->have_back = 0; in dri2CreateDrawable()
398 pdraw->swap_interval = 0; in dri2CreateDrawable()
403 pdraw->swap_interval = 1; in dri2CreateDrawable()
410 pdraw->driDrawable = in dri2CreateDrawable()
412 config->driConfig, pdraw); in dri2CreateDrawable()
414 if (!pdraw->driDrawable) { in dri2CreateDrawable()
416 free(pdraw); in dri2CreateDrawable()
420 if (__glxHashInsert(pdp->dri2Hash, xDrawable, pdraw)) { in dri2CreateDrawable()
421 (*psc->core->destroyDrawable) (pdraw->driDrawable); in dri2CreateDrawable()
423 free(pdraw); in dri2CreateDrawable()
432 psc->vtable.setSwapInterval(&pdraw->base, pdraw->swap_interval); in dri2CreateDrawable()
434 return &pdraw->base; in dri2CreateDrawable()
438 dri2DrawableGetMSC(struct glx_screen *psc, __GLXDRIdrawable *pdraw, in dri2DrawableGetMSC() argument
441 xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy); in dri2DrawableGetMSC()
445 get_msc_cookie = xcb_dri2_get_msc_unchecked(c, pdraw->xDrawable); in dri2DrawableGetMSC()
460 dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, in dri2WaitForMSC() argument
463 xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy); in dri2WaitForMSC()
474 wait_msc_cookie = xcb_dri2_wait_msc_unchecked(c, pdraw->xDrawable, in dri2WaitForMSC()
492 dri2WaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust, in dri2WaitForSBC() argument
495 xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy); in dri2WaitForSBC()
502 wait_sbc_cookie = xcb_dri2_wait_sbc_unchecked(c, pdraw->xDrawable, in dri2WaitForSBC()
572 __dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, in __dri2CopySubBuffer() argument
576 struct dri2_drawable *priv = (struct dri2_drawable *) pdraw; in __dri2CopySubBuffer()
577 struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc; in __dri2CopySubBuffer()
598 DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region, in __dri2CopySubBuffer()
605 DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region, in __dri2CopySubBuffer()
612 dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, in dri2CopySubBuffer() argument
615 __dri2CopySubBuffer(pdraw, x, y, width, height, in dri2CopySubBuffer()
675 struct dri2_drawable *pdraw = loaderPrivate; in dri2FlushFrontBuffer() local
678 if (!pdraw) in dri2FlushFrontBuffer()
681 if (!pdraw->base.psc) in dri2FlushFrontBuffer()
684 psc = (struct dri2_screen *) pdraw->base.psc; in dri2FlushFrontBuffer()
694 dri2Throttle(psc, pdraw, __DRI2_THROTTLE_FLUSHFRONT); in dri2FlushFrontBuffer()
698 dri2InvalidateBuffers(priv->dpy, pdraw->base.xDrawable); in dri2FlushFrontBuffer()
723 process_buffers(struct dri2_drawable * pdraw, DRI2Buffer * buffers, in process_buffers() argument
728 pdraw->bufferCount = count; in process_buffers()
729 pdraw->have_fake_front = 0; in process_buffers()
730 pdraw->have_back = 0; in process_buffers()
735 pdraw->buffers[i].attachment = buffers[i].attachment; in process_buffers()
736 pdraw->buffers[i].name = buffers[i].name; in process_buffers()
737 pdraw->buffers[i].pitch = buffers[i].pitch; in process_buffers()
738 pdraw->buffers[i].cpp = buffers[i].cpp; in process_buffers()
739 pdraw->buffers[i].flags = buffers[i].flags; in process_buffers()
740 if (pdraw->buffers[i].attachment == __DRI_BUFFER_FAKE_FRONT_LEFT) in process_buffers()
741 pdraw->have_fake_front = 1; in process_buffers()
742 if (pdraw->buffers[i].attachment == __DRI_BUFFER_BACK_LEFT) in process_buffers()
743 pdraw->have_back = 1; in process_buffers()
751 __GLXDRIdrawable *pdraw; in dri2GetSwapEventType() local
752 pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, drawable); in dri2GetSwapEventType()
753 if (!pdraw || !(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) in dri2GetSwapEventType()
783 __GLXDRIdrawable *pdraw, in dri2XcbSwapBuffers() argument
801 xcb_dri2_swap_buffers_unchecked(c, pdraw->xDrawable, in dri2XcbSwapBuffers()
828 dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, in dri2SwapBuffers() argument
831 struct dri2_drawable *priv = (struct dri2_drawable *) pdraw; in dri2SwapBuffers()
844 __dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height, in dri2SwapBuffers()
853 ret = dri2XcbSwapBuffers(pdraw->psc->dpy, pdraw, in dri2SwapBuffers()
863 dri2InvalidateBuffers(dpyPriv->dpy, pdraw->xDrawable); in dri2SwapBuffers()
874 struct dri2_drawable *pdraw = loaderPrivate; in dri2GetBuffers() local
877 buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable, in dri2GetBuffers()
882 pdraw->width = *width; in dri2GetBuffers()
883 pdraw->height = *height; in dri2GetBuffers()
884 process_buffers(pdraw, buffers, *out_count); in dri2GetBuffers()
888 return pdraw->buffers; in dri2GetBuffers()
897 struct dri2_drawable *pdraw = loaderPrivate; in dri2GetBuffersWithFormat() local
900 buffers = DRI2GetBuffersWithFormat(pdraw->base.psc->dpy, in dri2GetBuffersWithFormat()
901 pdraw->base.xDrawable, in dri2GetBuffersWithFormat()
907 pdraw->width = *width; in dri2GetBuffersWithFormat()
908 pdraw->height = *height; in dri2GetBuffersWithFormat()
909 process_buffers(pdraw, buffers, *out_count); in dri2GetBuffersWithFormat()
913 return pdraw->buffers; in dri2GetBuffersWithFormat()
917 dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval) in dri2SetSwapInterval() argument
919 xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy); in dri2SetSwapInterval()
920 struct dri2_drawable *priv = (struct dri2_drawable *) pdraw; in dri2SetSwapInterval()
948 dri2GetSwapInterval(__GLXDRIdrawable *pdraw) in dri2GetSwapInterval() argument
950 struct dri2_drawable *priv = (struct dri2_drawable *) pdraw; in dri2GetSwapInterval()
1004 __GLXDRIdrawable *pdraw = in dri2InvalidateBuffers() local
1007 struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw; in dri2InvalidateBuffers()
1009 if (!pdraw) in dri2InvalidateBuffers()
1012 psc = (struct dri2_screen *) pdraw->psc; in dri2InvalidateBuffers()
1014 if (pdraw && psc->f && psc->f->base.version >= 3 && psc->f->invalidate) in dri2InvalidateBuffers()
1027 struct dri2_drawable *pdraw = (struct dri2_drawable *) base; in dri2_bind_tex_image() local
1036 if (pdraw != NULL) { in dri2_bind_tex_image()
1041 psc->f->invalidate(pdraw->driDrawable); in dri2_bind_tex_image()
1046 pdraw->base.textureTarget, in dri2_bind_tex_image()
1047 pdraw->base.textureFormat, in dri2_bind_tex_image()
1048 pdraw->driDrawable); in dri2_bind_tex_image()
1052 pdraw->base.textureTarget, in dri2_bind_tex_image()
1053 pdraw->driDrawable); in dri2_bind_tex_image()
1065 struct dri2_drawable *pdraw = (struct dri2_drawable *) base; in dri2_release_tex_image() local
1068 if (dpyPriv != NULL && pdraw != NULL) { in dri2_release_tex_image()
1074 pdraw->base.textureTarget, in dri2_release_tex_image()
1075 pdraw->driDrawable); in dri2_release_tex_image()
1397 __GLXDRIdrawable *pdraw; in dri2GetGlxDrawableFromXDrawableId() local
1399 if (__glxHashLookup(pdp->dri2Hash, id, (void *) &pdraw) == 0) in dri2GetGlxDrawableFromXDrawableId()
1400 return pdraw; in dri2GetGlxDrawableFromXDrawableId()