这篇教程C++ xf86ScreenToScrn函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xf86ScreenToScrn函数的典型用法代码示例。如果您正苦于以下问题:C++ xf86ScreenToScrn函数的具体用法?C++ xf86ScreenToScrn怎么用?C++ xf86ScreenToScrn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xf86ScreenToScrn函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: intel_present_get_ust_mscstatic intintel_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc){ xf86CrtcPtr xf86_crtc = crtc->devPrivate; ScreenPtr screen = crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); return intel_get_crtc_msc_ust(scrn, xf86_crtc, msc, ust);}
开发者ID:01org,项目名称:iotg-lin-gfx-ddx,代码行数:9,
示例2: TegraDRI2CopyRegionstatic void TegraDRI2CopyRegion(DrawablePtr drawable, RegionPtr region, DRI2BufferPtr target, DRI2BufferPtr source){ ScrnInfoPtr pScrn = xf86ScreenToScrn(drawable->pScreen); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "> %s(drawable=%p, region=%p, target=%p, source=%p)/n", __func__, drawable, region, target, source); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "< %s()/n", __func__);}
开发者ID:kwizart,项目名称:xf86-video-opentegra,代码行数:9,
示例3: RADEONInitVideovoid RADEONInitVideo(ScreenPtr pScreen){ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr texturedAdaptor = NULL; int num_adaptors; /* no overlay or 3D on RN50 */ if (info->ChipFamily == CHIP_FAMILY_RV100 && !pRADEONEnt->HasCRTC2) return; num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); newAdaptors = malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); if (newAdaptors == NULL) return; memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); adaptors = newAdaptors; if (info->use_glamor) { texturedAdaptor = radeon_glamor_xv_init(pScreen, 16); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video (glamor)/n"); } else xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video (glamor)/n"); } else if ((info->ChipFamily < CHIP_FAMILY_RS400) || (info->directRenderingEnabled) ) { texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video/n"); } else xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video/n"); } else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Textured video requires CP on R5xx/R6xx/R7xx/IGP/n"); if(num_adaptors) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if(texturedAdaptor) { XF86MCAdaptorPtr xvmcAdaptor = RADEONCreateAdaptorXvMC(pScreen, (char *)texturedAdaptor->name); if(xvmcAdaptor) { if(!xf86XvMCScreenInit(pScreen, 1, &xvmcAdaptor)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[XvMC] Failed to initialize extension./n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[XvMC] Extension initialized./n"); } } if(newAdaptors) free(newAdaptors);}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-ati,代码行数:57,
示例4: gma_uxa_initBool gma_uxa_init(gma500Ptr gma, ScreenPtr screen){ ScrnInfoPtr scrn = xf86ScreenToScrn (screen); gma->uxa = uxa_driver_alloc(); if (gma->uxa == NULL) return FALSE;#if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey (&uxa_pixmap_index, PRIVATE_PIXMAP, 0)) return FALSE;#else if (!dixRequestPrivate (&uxa_pixmap_index, 0)) return FALSE;#endif gma->uxa->uxa_major = 1; gma->uxa->uxa_minor = 0; /* Access */ gma->uxa->prepare_access = gma_uxa_prepare_access; gma->uxa->finish_access = gma_uxa_finish_access; gma->uxa->pixmap_is_offscreen = gma_uxa_pixmap_is_offscreen; /* Migration */ gma->uxa->put_image = gma_uxa_put_image; /* Solid */ gma->uxa->check_solid = gma_uxa_check_solid; gma->uxa->prepare_solid = gma_uxa_prepare_solid; gma->uxa->solid = gma_uxa_solid; gma->uxa->done_solid = gma_uxa_done_solid; /* Copy */ gma->uxa->check_copy = gma_uxa_check_copy; gma->uxa->prepare_copy = gma_uxa_prepare_copy; gma->uxa->copy = gma_uxa_copy; gma->uxa->done_copy = gma_uxa_done_copy; /* Composite */ gma->uxa->check_composite = gma_uxa_check_composite; screen->SetScreenPixmap = gma_uxa_set_screen_pixmap; screen->CreatePixmap = gma_uxa_create_pixmap; screen->DestroyPixmap = gma_uxa_destroy_pixmap; gma->cs_bo = gma_bo_create(gma->fd, 4096, GMA_BO_BLIT, 0); gma_bo_mmap(gma->fd, gma->cs_bo); if (!uxa_driver_init(screen, gma->uxa)) { xf86DrvMsg (scrn->scrnIndex, X_ERROR, "UXA initialization failed/n"); return FALSE; } return TRUE;}
开发者ID:alLi1n,项目名称:xf86-video-gma500,代码行数:56,
示例5: ExaModifyPixmapHeaderstatic BoolExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData){ ScreenPtr pScreen = pPixmap->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap); modesettingPtr ms = modesettingPTR(pScrn); struct exa_context *exa = ms->exa; if (!priv || pPixData) return FALSE; if (0) { debug_printf("%s pixmap %p sz %dx%dx%d devKind %d/n", __FUNCTION__, pPixmap, width, height, bitsPerPixel, devKind); if (priv->tex) debug_printf(" ==> old texture %dx%d/n", priv->tex->width0, priv->tex->height0); } if (depth <= 0) depth = pPixmap->drawable.depth; if (bitsPerPixel <= 0) bitsPerPixel = pPixmap->drawable.bitsPerPixel; if (width <= 0) width = pPixmap->drawable.width; if (height <= 0) height = pPixmap->drawable.height; if (width <= 0 || height <= 0 || depth <= 0) return FALSE; miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, NULL); priv->width = width; priv->height = height; /* Deal with screen resize */ if ((exa->accel || priv->flags) && (!priv->tex || !size_match(width, priv->tex->width0) || !size_match(height, priv->tex->height0) || priv->tex_flags != priv->flags)) { struct pipe_resource *texture = NULL; struct pipe_resource template; memset(&template, 0, sizeof(template));
开发者ID:anupamkaul,项目名称:mesa,代码行数:56,
示例6: AlpDonestatic voidAlpDone(PixmapPtr pPixmap){ ScreenPtr pScreen = pPixmap->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CirPtr pCir = CIRPTR(pScrn);#ifdef ALP_DEBUG ErrorF("AlpDone/n");#endif}
开发者ID:openbsd-unofficial,项目名称:openbsd-xenocara,代码行数:10,
示例7: can_sync_to_vblankstatic Boolcan_sync_to_vblank(DrawablePtr draw){ ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); return pNv->glx_vblank && nv_window_belongs_to_crtc(scrn, draw->x, draw->y, draw->width, draw->height);}
开发者ID:imirkin,项目名称:xf86-video-nouveau,代码行数:10,
示例8: VGAarbiterCloseScreen/* Screen funcs */static BoolVGAarbiterCloseScreen(ScreenPtr pScreen){ Bool val; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); miPointerScreenPtr PointPriv = (miPointerScreenPtr) dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); UNWRAP_SCREEN(CreateGC); UNWRAP_SCREEN(CloseScreen); UNWRAP_SCREEN(GetImage); UNWRAP_SCREEN(GetSpans); UNWRAP_SCREEN(SourceValidate); UNWRAP_SCREEN(CopyWindow); UNWRAP_SCREEN(ClearToBackground); UNWRAP_SCREEN(SaveScreen); UNWRAP_SCREEN(StoreColors); UNWRAP_SCREEN(DisplayCursor); UNWRAP_SCREEN(RealizeCursor); UNWRAP_SCREEN(UnrealizeCursor); UNWRAP_SCREEN(RecolorCursor); UNWRAP_SCREEN(SetCursorPosition); UNWRAP_PICT(Composite); UNWRAP_PICT(Glyphs); UNWRAP_PICT(CompositeRects); UNWRAP_SCREEN_INFO(AdjustFrame); UNWRAP_SCREEN_INFO(SwitchMode); UNWRAP_SCREEN_INFO(EnterVT); UNWRAP_SCREEN_INFO(LeaveVT); UNWRAP_SCREEN_INFO(FreeScreen); UNWRAP_SPRITE; free((void *) pScreenPriv); xf86VGAarbiterLock(xf86ScreenToScrn(pScreen)); val = (*pScreen->CloseScreen) (pScreen); xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen)); return val;}
开发者ID:XQuartz,项目名称:xorg-server,代码行数:44,
示例9: TegraDRI2GetMSCstatic int TegraDRI2GetMSC(DrawablePtr drawable, CARD64 *ust, CARD64 *msc){ ScrnInfoPtr pScrn = xf86ScreenToScrn(drawable->pScreen); int ret = 0; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "> %s(drawable=%p, ust=%p, msc=%p)/n", __func__, drawable, ust, msc); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "< %s() = %d/n", __func__, ret); return ret;}
开发者ID:kwizart,项目名称:xf86-video-opentegra,代码行数:10,
示例10: radeon_glamor_exchange_buffersvoidradeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst){ RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(dst->drawable.pScreen)); if (!info->use_glamor) return; glamor_egl_exchange_buffers(src, dst);}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-ati,代码行数:10,
示例11: xf86RotateCloseScreenvoidxf86RotateCloseScreen(ScreenPtr screen){ ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; for (c = 0; c < xf86_config->num_crtc; c++) xf86RotateDestroy(xf86_config->crtc[c]);}
开发者ID:dlespiau,项目名称:xserver,代码行数:10,
示例12: intel_present_flush/* * Flush our batch buffer when requested by the Present extension. */static voidintel_present_flush(WindowPtr window){ ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); if (intel->flush_rendering) intel->flush_rendering(intel);}
开发者ID:frydsh,项目名称:xf86-video-intel,代码行数:13,
示例13: nouveau_present_finivoidnouveau_present_fini(ScreenPtr screen){ ScrnInfoPtr scrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(scrn); if (pNv->present) { free(pNv->present); pNv->present = NULL; }}
开发者ID:freedesktop-unofficial-mirror,项目名称:nouveau__xf86-video-nouveau,代码行数:10,
示例14: ExaCopystatic voidExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int width, int height){ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDstPixmap->drawable.pScreen); modesettingPtr ms = modesettingPTR(pScrn); struct exa_context *exa = ms->exa; struct pipe_box src_box; exa_debug_printf("/tExaCopy(srcx=%d, srcy=%d, dstX=%d, dstY=%d, w=%d, h=%d)/n", srcX, srcY, dstX, dstY, width, height); debug_assert(exaGetPixmapDriverPrivate(pDstPixmap) == exa->copy.dst); u_box_2d(srcX, srcY, width, height, &src_box); /* If source and destination overlap, we have to copy to/from a scratch * pixmap. */ if (exa->copy.dst == exa->copy.src && !((dstX + width) < srcX || dstX > (srcX + width) || (dstY + height) < srcY || dstY > (srcY + height))) { struct exa_pixmap_priv *tmp_priv; if (!exa->copy.tmp_pix) { exa->copy.tmp_pix = pScrn->pScreen->CreatePixmap(pScrn->pScreen, pDstPixmap->drawable.width, pDstPixmap->drawable.height, pDstPixmap->drawable.depth, pDstPixmap->drawable.width); exaMoveInPixmap(exa->copy.tmp_pix); } tmp_priv = exaGetPixmapDriverPrivate(exa->copy.tmp_pix); exa->pipe->resource_copy_region( exa->pipe, tmp_priv->tex, 0, srcX, srcY, 0, exa->copy.src->tex, 0, &src_box); exa->pipe->resource_copy_region( exa->pipe, exa->copy.dst->tex, 0, dstX, dstY, 0, tmp_priv->tex, 0, &src_box); } else exa->pipe->resource_copy_region( exa->pipe, exa->copy.dst->tex, 0, dstX, dstY, 0, exa->copy.src->tex, 0, &src_box);}
开发者ID:anupamkaul,项目名称:mesa,代码行数:55,
示例15: CHIPSSetupImageVideostatic XF86VideoAdaptorPtr CHIPSSetupImageVideo(ScreenPtr pScreen){ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CHIPSPtr cPtr = CHIPSPTR(pScrn); XF86VideoAdaptorPtr adapt; CHIPSPortPrivPtr pPriv; if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(CHIPSPortPrivRec) + sizeof(DevUnion)))) return NULL; adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; adapt->name = "Chips and Technologies Backend Scaler"; adapt->nEncodings = 1; adapt->pEncodings = DummyEncoding; adapt->nFormats = NUM_FORMATS; adapt->pFormats = Formats; adapt->nPorts = 1; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (CHIPSPortPrivPtr)(&adapt->pPortPrivates[1]); adapt->pPortPrivates[0].ptr = (pointer)(pPriv); adapt->pAttributes = Attributes; adapt->nImages = NUM_IMAGES; adapt->nAttributes = NUM_ATTRIBUTES; adapt->pImages = Images; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = CHIPSStopVideo; adapt->SetPortAttribute = CHIPSSetPortAttribute; adapt->GetPortAttribute = CHIPSGetPortAttribute; adapt->QueryBestSize = CHIPSQueryBestSize; adapt->PutImage = CHIPSPutImage; adapt->QueryImageAttributes = CHIPSQueryImageAttributes; pPriv->colorKey = cPtr->videoKey; pPriv->videoStatus = 0; pPriv->manualDoubleBuffer = FALSE; pPriv->currentBuffer = 0; /* gotta uninit this someplace */ REGION_NULL(pScreen, &pPriv->clip); cPtr->adaptor = adapt; xvColorKey = MAKE_ATOM("XV_COLORKEY"); CHIPSResetVideo(pScrn); return adapt;}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-chips,代码行数:55,
示例16: nouveau_dri2_swap_limit_validatestatic Boolnouveau_dri2_swap_limit_validate(DrawablePtr draw, int swap_limit){ ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); if ((swap_limit < 1 ) || (swap_limit > pNv->max_swap_limit)) return FALSE; return TRUE;}
开发者ID:imirkin,项目名称:xf86-video-nouveau,代码行数:11,
示例17: AlpPrepareSolidstatic BoolAlpPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg){ ScreenPtr pScreen = pPixmap->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CirPtr pCir = CIRPTR(pScrn); AlpPtr pAlp = ALPPTR(pCir); int pitch = pCir->pitch; #ifdef ALP_DEBUG ErrorF("AlpSetupForSolidFill color=%x alu=%x planemask=%x/n", fg, alu, planemask);#endif WAIT; SetupForRop(alu); switch (pCir -> Chipset) { case PCI_CHIP_GD7548: /* The GD7548 does not (apparently) support solid filling directly, it always need an actual source. We therefore use it as a pattern fill with a solid pattern */ { int source = pAlp->monoPattern8x8; /* source = 8x8 solid mono pattern */ outw(pCir->PIOReg, ((source << 8) & 0xff00) | 0x2C); outw(pCir->PIOReg, ((source) & 0xff00) | 0x2D); outw(pCir->PIOReg, ((source >> 8) & 0x3f00) | 0x2E); /* memset() may not be the fastest */ memset((char *)pCir->FbBase + pAlp->monoPattern8x8, 0xFF, 8); write_mem_barrier(); break; } default: /* GR33 = 0x04 => does not exist on GD7548 */ outw(pCir->PIOReg, 0x0433); } /* GR30 = color expansion, pattern copy */ /* Choses 8bpp / 16bpp color expansion */ outw(pCir->PIOReg, 0xC030 |((pScrn->bitsPerPixel - 8) << 9)); outw(pCir->PIOReg, ((fg << 8) & 0xff00) | 0x01); outw(pCir->PIOReg, ((fg) & 0xff00) | 0x11); outw(pCir->PIOReg, ((fg >> 8) & 0xff00) | 0x13); outw(pCir->PIOReg, 0x15); /* Set dest pitch */ outw(pCir->PIOReg, ((pitch << 8) & 0xff00) | 0x24); outw(pCir->PIOReg, ((pitch) & 0x1f00) | 0x25); return TRUE;}
开发者ID:openbsd-unofficial,项目名称:openbsd-xenocara,代码行数:54,
示例18: nouveau_dri2_flip_event_handlerstatic voidnouveau_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data){ struct nouveau_dri2_vblank_state *flip = event_data; DrawablePtr draw; ScreenPtr screen; ScrnInfoPtr scrn; int status; status = dixLookupDrawable(&draw, flip->draw, serverClient, M_ANY, DixWriteAccess); if (status != Success) { free(flip); return; } screen = draw->pScreen; scrn = xf86ScreenToScrn(screen); /* We assume our flips arrive in order, so we don't check the frame */ switch (flip->action) { case SWAP: /* Check for too small vblank count of pageflip completion, * taking wraparound into account. This usually means some * defective kms pageflip completion, causing wrong (msc, ust) * return values and possible visual corruption. * Skip test for frame == 0, as this is a valid constant value * reported by all Linux kernels at least up to Linux 3.0. */ if ((frame != 0) && (frame < flip->frame) && (flip->frame - frame < 5)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Pageflip has impossible msc %d < target_msc %d/n", __func__, frame, flip->frame); /* All-Zero values signal failure of (msc, ust) * timestamping to client. */ frame = tv_sec = tv_usec = 0; } DRI2SwapComplete(flip->client, draw, frame, tv_sec, tv_usec, DRI2_FLIP_COMPLETE, flip->func, flip->data); break; default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event received/n", __func__); /* Unknown type */ break; } free(flip);}
开发者ID:imirkin,项目名称:xf86-video-nouveau,代码行数:54,
示例19: nouveau_dri2_finish_swapstatic voidnouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, struct nouveau_dri2_vblank_state *s){ ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); PixmapPtr dst_pix; PixmapPtr src_pix = nouveau_dri2_buffer(s->src)->ppix; struct nouveau_bo *dst_bo; struct nouveau_bo *src_bo = nouveau_pixmap_bo(src_pix); struct nouveau_pushbuf *push = pNv->pushbuf; RegionRec reg; int type, ret; Bool front_updated, will_exchange; xf86CrtcPtr ref_crtc; REGION_INIT(0, ®, (&(BoxRec){ 0, 0, draw->width, draw->height }), 0); REGION_TRANSLATE(0, ®, draw->x, draw->y); /* Main crtc for this drawable shall finally deliver pageflip event. */ ref_crtc = nouveau_pick_best_crtc(scrn, FALSE, draw->x, draw->y, draw->width, draw->height); /* Update frontbuffer pixmap and name: Could have changed due to * window (un)redirection as part of compositing. */ front_updated = update_front(draw, s->dst); /* Assign frontbuffer pixmap, after update in update_front() */ dst_pix = nouveau_dri2_buffer(s->dst)->ppix; dst_bo = nouveau_pixmap_bo(dst_pix); /* Throttle on the previous frame before swapping */ nouveau_bo_wait(dst_bo, NOUVEAU_BO_RD, push->client); /* Swap by buffer exchange possible? */ will_exchange = front_updated && can_exchange(draw, dst_pix, src_pix); /* Only emit a wait for vblank pushbuf here if this is a copy-swap, or * if it is a kms pageflip-swap on an old kernel. Pure exchange swaps * don't need sync to vblank. kms pageflip-swaps on Linux 3.13+ are * synced to vblank in the kms driver, so we must not sync here, or * framerate will be cut in half! */ if (can_sync_to_vblank(draw) && (!will_exchange || (!pNv->has_async_pageflip && nouveau_exa_pixmap_is_onscreen(dst_pix)))) { /* Reference the back buffer to sync it to vblank */ nouveau_pushbuf_refn(push, &(struct nouveau_pushbuf_refn) { src_bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, 1);
开发者ID:imirkin,项目名称:xf86-video-nouveau,代码行数:53,
示例20: radeon_glamor_create_textured_pixmapBoolradeon_glamor_create_textured_pixmap(PixmapPtr pixmap, struct radeon_pixmap *priv){ ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(scrn); if ((info->use_glamor) == 0) return TRUE; return glamor_egl_create_textured_pixmap(pixmap, priv->bo->handle, pixmap->devKind);}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-ati,代码行数:12,
示例21: TegraDRI2ScheduleWaitMSCstatic int TegraDRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr drawable, CARD64 msc, CARD64 divisor, CARD64 remainder){ ScrnInfoPtr pScrn = xf86ScreenToScrn(drawable->pScreen); int ret = 0; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "> %s(client=%p, drawable=%p, msc=%" PRIu64 ", divisor=%" PRIu64 ", remainder=%" PRIu64")/n", __func__, client, drawable, msc, divisor, remainder); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "< %s() = %d/n", __func__, ret); return ret;}
开发者ID:kwizart,项目名称:xf86-video-opentegra,代码行数:12,
示例22: ms_present_flush/* * Flush our batch buffer when requested by the Present extension. */static voidms_present_flush(WindowPtr window){#ifdef GLAMOR ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (ms->drmmode.glamor) glamor_block_handler(screen);#endif}
开发者ID:GalliumOS,项目名称:xorg-server,代码行数:15,
示例23: AlpCopystatic voidAlpCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int width, int height){ ScreenPtr pScreen = pDstPixmap->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CirPtr pCir = CIRPTR(pScrn); int source, dest; int hh, ww; int decrement = 0; int pitch = pCir->pitch; ww = (width * pScrn->bitsPerPixel / 8) - 1; hh = height - 1; dest = dstY * pitch + dstX * pScrn->bitsPerPixel / 8; source = srcY * pitch + srcX * pScrn->bitsPerPixel / 8; if (dest > source) { decrement = 1 << 8; dest += hh * pitch + ww; source += hh * pitch + ww; } WAIT; outw(pCir->PIOReg, decrement | 0x30); /* Width */ outw(pCir->PIOReg, ((ww << 8) & 0xff00) | 0x20); outw(pCir->PIOReg, ((ww) & 0x1f00) | 0x21); /* Height */ outw(pCir->PIOReg, ((hh << 8) & 0xff00) | 0x22); outw(pCir->PIOReg, ((hh) & 0x0700) | 0x23); /* source */ outw(pCir->PIOReg, ((source << 8) & 0xff00) | 0x2C); outw(pCir->PIOReg, ((source) & 0xff00) | 0x2D); outw(pCir->PIOReg, ((source >> 8) & 0x3f00)| 0x2E); /* dest */ outw(pCir->PIOReg, ((dest << 8) & 0xff00) | 0x28); outw(pCir->PIOReg, ((dest) & 0xff00) | 0x29); outw(pCir->PIOReg, ((dest >> 8) & 0x3f00) | 0x2A); if (!pCir->chip.alp->autoStart) outw(pCir->PIOReg, 0x0231); #ifdef ALP_DEBUG ErrorF("AlpCopy x1=%d y1=%d x2=%d y2=%d w=%d h=%d/n", srcX, srcY, dstX, dstY, width, height); ErrorF("AlpSCopy s=%d d=%d ww=%d hh=%d/n", source, dest, ww, hh);#endif}
开发者ID:openbsd-unofficial,项目名称:openbsd-xenocara,代码行数:53,
示例24: TegraCreateScreenResourcesstatic BoolTegraCreateScreenResources(ScreenPtr pScreen){ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); TegraPtr tegra = TegraPTR(pScrn); PixmapPtr rootPixmap; Bool ret; void *pixels; pScreen->CreateScreenResources = tegra->createScreenResources; ret = pScreen->CreateScreenResources(pScreen); pScreen->CreateScreenResources = TegraCreateScreenResources; if (!drmmode_set_desired_modes(pScrn, &tegra->drmmode)) return FALSE; drmmode_uevent_init(pScrn, &tegra->drmmode); if (!tegra->drmmode.want_sw_cursor) drmmode_map_cursor_bos(pScrn, &tegra->drmmode); pixels = drmmode_map_front_bo(&tegra->drmmode); if (!pixels) return FALSE; rootPixmap = pScreen->GetScreenPixmap(pScreen); if (tegra->drmmode.shadow_enable) pixels = tegra->drmmode.shadow_fb; if (!pScreen->ModifyPixmapHeader(rootPixmap, -1, -1, -1, -1, -1, pixels)) FatalError("Couldn't adjust screen pixmap/n"); if (tegra->drmmode.shadow_enable) { if (!shadowAdd(pScreen, rootPixmap, shadowUpdatePackedWeak(), TegraShadowWindow, 0, 0)) return FALSE; } tegra->damage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, pScreen, rootPixmap); if (tegra->damage) { DamageRegister(&rootPixmap->drawable, tegra->damage); tegra->dirty_enabled = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Damage tracking initialized/n"); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to create screen damage record/n"); return FALSE; } return ret;}
开发者ID:freedesktop-unofficial-mirror,项目名称:xorg__driver__xf86-video-opentegra,代码行数:53,
示例25: intel_dri3_pixmap_from_fdstatic PixmapPtr intel_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp){ ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); struct intel_uxa_pixmap *priv; PixmapPtr pixmap; dri_bo *bo; if (depth < 8) return NULL; switch (bpp) { case 8: case 16: case 32: break; default: return NULL; } pixmap = fbCreatePixmap(screen, 0, 0, depth, 0); if (!pixmap) return NULL; if (!screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, stride, NULL)) goto free_pixmap; bo = drm_intel_bo_gem_create_from_prime(intel->bufmgr, fd, (uint32_t)height * stride); if (bo == NULL) goto free_pixmap; intel_uxa_set_pixmap_bo(pixmap, bo); dri_bo_unreference(bo); priv = intel_uxa_get_pixmap_private(pixmap); if (priv == NULL) goto free_pixmap; priv->pinned |= PIN_DRI3; return pixmap;free_pixmap: fbDestroyPixmap(pixmap); return NULL;}
开发者ID:01org,项目名称:iotg-lin-gfx-ddx,代码行数:53,
示例26: nouveau_present_flip_checkstatic Boolnouveau_present_flip_check(RRCrtcPtr rrcrtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip){ ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen); xf86CrtcPtr crtc = rrcrtc->devPrivate; if (!scrn->vtSema || !crtc->enabled) return FALSE; return TRUE;}
开发者ID:freedesktop-unofficial-mirror,项目名称:nouveau__xf86-video-nouveau,代码行数:12,
示例27: xf86RotateCloseScreenvoidxf86RotateCloseScreen(ScreenPtr screen){ ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; /* This has already been destroyed when the root window was destroyed */ xf86_config->rotation_damage = NULL; for (c = 0; c < xf86_config->num_crtc; c++) xf86RotateDestroy(xf86_config->crtc[c]);}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:12,
示例28: AlpSyncstatic voidAlpSync(ScreenPtr pScreen, int marker){ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CirPtr pCir = CIRPTR(pScrn);#ifdef ALP_DEBUG ErrorF("AlpSync/n");#endif WAIT_1; return;}
开发者ID:openbsd-unofficial,项目名称:openbsd-xenocara,代码行数:12,
注:本文中的xf86ScreenToScrn函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xf_lock_x11函数代码示例 C++ xf86Msg函数代码示例 |