• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ crDebug函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中crDebug函数的典型用法代码示例。如果您正苦于以下问题:C++ crDebug函数的具体用法?C++ crDebug怎么用?C++ crDebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了crDebug函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vboxApplyPatch

static void
vboxApplyPatch(const char* psFuncName, void *pDst, const void *pSrc, unsigned long size)
{
    void *alPatch;
    int rv;

    /* Get aligned start address we're going to patch*/
    alPatch = (void*) ((uintptr_t)pDst & ~(uintptr_t)(PAGESIZE-1));

#ifndef VBOX_NO_MESA_PATCH_REPORTS
    crDebug("MProtecting: %p, %li", alPatch, pDst-alPatch+size);
#endif

    /* Get write access to mesa functions */
    rv = RTMemProtect(alPatch, pDst-alPatch+size, RTMEM_PROT_READ|RTMEM_PROT_WRITE|RTMEM_PROT_EXEC);
    if (RT_FAILURE(rv))
    {
        crError("mprotect failed with %x (%s)", rv, psFuncName);
    }

#ifndef VBOX_NO_MESA_PATCH_REPORTS
    crDebug("Writing %li bytes to %p from %p", size, pDst, pSrc);
#endif

    crMemcpy(pDst, pSrc, size);

    /*@todo Restore the protection, probably have to check what was it before us...*/
    rv = RTMemProtect(alPatch, pDst-alPatch+size, RTMEM_PROT_READ|RTMEM_PROT_EXEC);
    if (RT_FAILURE(rv))
    {
        crError("mprotect2 failed with %x (%s)", rv, psFuncName);
    }
}
开发者ID:tonado,项目名称:vbox,代码行数:33,代码来源:fakedri_drv.c


示例2: stubUpdateWindowGeometry

/*
 *  Updates geometry info for given spu window.
 *  Returns GL_TRUE if it changed since last call, GL_FALSE otherwise.
 *  bForceUpdate - forces dispatching of geometry info even if it's unchanged
 */
GLboolean stubUpdateWindowGeometry(WindowInfo *pWindow, GLboolean bForceUpdate)
{
    int winX, winY;
    unsigned int winW, winH;
    GLboolean res = GL_FALSE;

    CRASSERT(pWindow);

    stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);

    /* @todo remove "if (winW && winH)"?*/
    if (winW && winH) {
        if (stub.trackWindowSize) {
            if (bForceUpdate || winW != pWindow->width || winH != pWindow->height) {
                crDebug("Dispatched WindowSize (%i)", pWindow->spuWindow);
                stub.spuDispatch.WindowSize(pWindow->spuWindow, winW, winH);
                pWindow->width = winW;
                pWindow->height = winH;
                res = GL_TRUE;
            }
        }
        if (stub.trackWindowPos) {
            if (bForceUpdate || winX != pWindow->x || winY != pWindow->y) {
                crDebug("Dispatched WindowPosition (%i)", pWindow->spuWindow);
                stub.spuDispatch.WindowPosition(pWindow->spuWindow, winX, winY);
                pWindow->x = winX;
                pWindow->y = winY;
                res = GL_TRUE;
            }
        }
    }

    return res;
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:39,代码来源:stub.c


示例3: vncspuNetLoggerInit

static void
vncspuNetLoggerInit(void)
{
#ifdef NETLOGGER
	if (vnc_spu.netlogger_url) {
		char *c;

		crDebug("VNC SPU: NetLogger URL: %s", vnc_spu.netlogger_url);
#if 0
		if (vnc_spu.netlogger_url) {
			/* XXX add unlink() wrapper to Cr util package */
			unlink(vnc_spu.netlogger_url);
		}
#endif
		NL_logger_module("vncspu", /* module name */
										 vnc_spu.netlogger_url,
										 NL_LVL_DEBUG, /* logging level */
										 NL_TYPE_APP, /* target type */
										 "" /* terminator */
										 );
		NL_info("vncspu", "spu.program.begin", "");

		vnc_spu.hostname = crAlloc(101);
		crGetHostname(vnc_spu.hostname, 100);
		/* truncate at first dot */
		if ((c = crStrchr(vnc_spu.hostname, '.')))
			*c = 0;
	}
	else {
		crDebug("VNC SPU: NetLogger disabled");
	}
#endif
}
开发者ID:alown,项目名称:chromium,代码行数:33,代码来源:vncspu_init.c


示例4: crNetConnectToServer

/**
 * Establish a connection with a server.
 * \param server  the server to connect to, in the form
 *                "protocol://servername:port" where the port specifier
 *                is optional and if the protocol is missing it is assumed
 *                to be "tcpip".
 * \param default_port  the port to connect to, if port not specified in the
 *                      server URL string.
 * \param mtu  desired maximum transmission unit size (in bytes)
 */
CRConnection *
crNetConnectToServer( const char *server, unsigned short default_port, int mtu)
{
	char hostname[4096], protocol[4096];
	unsigned short port;
	CRConnection *conn;

	crDebug( "In crNetConnectToServer( \"%s\", port=%d, mtu=%d )",
					 server, default_port, mtu );

	CRASSERT( cr_net.initialized );

	if (mtu < CR_MINIMUM_MTU)
	{
		crError( "You tried to connect to server \"%s\" with an mtu of %d, "
						 "but the minimum MTU is %d", server, mtu, CR_MINIMUM_MTU );
	}

	/* Tear the URL apart into relevant portions. */
	if ( !crParseURL( server, protocol, hostname, &port, default_port ) ) {
		 crError( "Malformed URL: \"%s\"", server );
	}

	crDebug( "Connecting to %s on port %d, with protocol %s",
					 hostname, port, protocol );

	conn = (CRConnection *) crCalloc( sizeof(*conn) );
	if (!conn)
		return NULL;

	/* init the non-zero fields */
	conn->type               = CR_NO_CONNECTION; /* we don't know yet */
	conn->recv_credits       = CR_INITIAL_RECV_CREDITS;
	conn->hostname           = crStrdup( hostname );
	conn->port               = port;
	conn->mtu                = mtu;
	conn->buffer_size        = mtu;
	conn->endianness         = crDetermineEndianness();

#ifdef CHROMIUM_THREADSAFE
	crInitMutex(&conn->messageList.lock);
	crInitCondition(&conn->messageList.nonEmpty);
#endif

	/* now, just dispatch to the appropriate protocol's initialization functions. */
	InitConnection(conn, protocol, mtu);

	if (!crNetConnect( conn ))
	{
		crDebug("crNetConnectToServer() failed, freeing the connection");
		crFree( conn );
		return NULL;
	}

	crDebug( "Done connecting to %s (swapping=%d)", server, conn->swap );
#ifndef NDEBUG
	crNetDumpConnectionInfo(conn);
#endif
	return conn;
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:70,代码来源:net.c


示例5: renderspuWindowDestroy

static void
RENDER_APIENTRY renderspuWindowDestroy( GLint win )
{
    WindowInfo *window;
    GET_CONTEXT(pOldCtx);

    CRASSERT(win >= 0);
    window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
    if (window) {
        crDebug("Render SPU: Destroy window (%d)", win);
        renderspu_SystemDestroyWindow( window );
        /* remove window info from hash table, and free it */
        crHashtableDelete(render_spu.windowTable, win, crFree);

        /* check if this window is bound to some ctx. Note: window pointer is already freed here */
        crHashtableWalk(render_spu.contextTable, renderspuCheckCurrentCtxWindowCB, window);

        /* restore current context */
        {
            GET_CONTEXT(pNewCtx);
            if (pNewCtx!=pOldCtx)
            {
                renderspuMakeCurrent(pOldCtx&&pOldCtx->currentWindow ? pOldCtx->currentWindow->id:0, 0,
                                     pOldCtx ? pOldCtx->id:0);
            }
        }
    }
    else {
        crDebug("Render SPU: Attempt to destroy invalid window (%d)", win);
    }
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:31,代码来源:renderspu.c


示例6: renderspuAtiQuirk_Apply

static int renderspuAtiQuirk_Apply()
{
    char aBuf[4096];
    DWORD cbResult = 0;
    LPCSTR pszVal;
    int rc;

    crDebug("renderspuAtiQuirk_Apply..");

    rc = renderspuAtiQuirk_GetICDDriverList(aBuf, sizeof (aBuf), &cbResult);
    if (RT_FAILURE(rc))
    {
        crDebug("renderspuAtiQuirk_GetICDDriverList failed, rc(%d)", rc);
        return rc;
    }

    for (pszVal = renderspuRegMultiSzCurVal(aBuf);
            pszVal;
            pszVal = renderspuRegMultiSzNextVal(pszVal))
    {
        renderspuAtiQuirk_ApplyForModule(pszVal);
    }

    return VINF_SUCCESS;
}
开发者ID:greg100795,项目名称:virtualbox,代码行数:25,代码来源:renderspu_wgl.c


示例7: renderspuAtiQuirk_ApplyForModule

static int renderspuAtiQuirk_ApplyForModule(LPCSTR pszAtiDll)
{
    int rc;
    HMODULE hAtiDll;

    crDebug("renderspuAtiQuirk_ApplyForModule (%s)", pszAtiDll);

    hAtiDll = GetModuleHandleA(pszAtiDll);
    if (!hAtiDll)
    {
        crDebug("GetModuleHandle failed, %d", GetLastError());
        return VERR_NOT_FOUND;
    }

    rc = renderspuIatPatcherPatchFunction(hAtiDll, "user32.dll", "GetForegroundWindow", (void*)renderspuAtiQuirk_GetForegroundWindow);
    if (RT_FAILURE(rc))
    {
        crDebug("renderspuIatPatcherPatchFunction failed, %d", rc);
        return rc;
    }

    crDebug("renderspuAtiQuirk_ApplyForModule SUCCEEDED!");
    crInfo("ATI Fullscreen qwirk SUCCEEDED!");

    return VINF_SUCCESS;
}
开发者ID:greg100795,项目名称:virtualbox,代码行数:26,代码来源:renderspu_wgl.c


示例8: DECLEXPORT

DECLEXPORT(int32_t) crVBoxServerMapScreen(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h, uint64_t winID)
{
    crDebug("crVBoxServerMapScreen(%i) [%i,%i:%u,%u %x]", sIndex, x, y, w, h, winID);

    if (sIndex<0 || sIndex>=cr_server.screenCount)
        return VERR_INVALID_PARAMETER;

    if (MAPPED(SCREEN(sIndex)) && SCREEN(sIndex).winID!=winID)
    {
        crDebug("Mapped screen[%i] is being remapped.", sIndex);
        crVBoxServerUnmapScreen(sIndex);
    }

    SCREEN(sIndex).winID = winID;
    SCREEN(sIndex).x = x;
    SCREEN(sIndex).y = y;
    SCREEN(sIndex).w = w;
    SCREEN(sIndex).h = h;

    renderspuSetWindowId(SCREEN(sIndex).winID);
    crHashtableWalk(cr_server.muralTable, crVBoxServerReparentMuralCB, &sIndex);
    renderspuSetWindowId(SCREEN(0).winID);

    crHashtableWalk(cr_server.muralTable, crVBoxServerCheckMuralCB, NULL);

#ifndef WINDOWS
    /*Restore FB content for clients, which have current window on a screen being remapped*/
    {
        GLint i;

        for (i = 0; i < cr_server.numClients; i++)
        {
            cr_server.curClient = cr_server.clients[i];
            if (cr_server.curClient->currentCtx
                && (cr_server.curClient->currentCtx->buffer.pFrontImg || cr_server.curClient->currentCtx->buffer.pBackImg)
                && cr_server.curClient->currentMural
                && cr_server.curClient->currentMural->screenId == sIndex
                && cr_server.curClient->currentCtx->buffer.storedHeight == h
                && cr_server.curClient->currentCtx->buffer.storedWidth == w)
            {
                int clientWindow = cr_server.curClient->currentWindow;
                int clientContext = cr_server.curClient->currentContextNumber;

                if (clientWindow && clientWindow != cr_server.currentWindow)
                {
                    crServerDispatchMakeCurrent(clientWindow, 0, clientContext);
                }

                crStateApplyFBImage(cr_server.curClient->currentCtx);
            }
        }
        cr_server.curClient = NULL;
    }
#endif

    return VINF_SUCCESS;
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:57,代码来源:server_main.c


示例9: replicatespuDebugOpcodes

static void replicatespuDebugOpcodes( CRPackBuffer *pack )
{
	unsigned char *tmp;
	for (tmp = pack->opcode_start; tmp > pack->opcode_current; tmp--)
	{
		crDebug( "  %d (0x%p, 0x%p)", *tmp, tmp, pack->opcode_current );
	}
	crDebug( "\n" );
}
开发者ID:alown,项目名称:chromium,代码行数:9,代码来源:replicatespu_redirect.c


示例10: GetCursorPosition

static void
GetCursorPosition( const WindowInfo *window, int pos[2] )
{
	RECT rect;
	POINT point;
	GLint size[2], x, y;
	unsigned int NativeHeight, NativeWidth, ChromiumHeight, ChromiumWidth;
	float WidthRatio, HeightRatio;
	static int DebugFlag = 0;
	
	// apparently the "window" parameter passed to this 
	// function contains the native window information
	HWND NATIVEhwnd = WindowFromDC( window->drawable );	

	// get the native window's height and width
	stubGetWindowGeometry(window, &x, &y, &NativeWidth, &NativeHeight);

	// get the spu window's height and width
	stub.spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, window->spuWindow, GL_INT, 2, size);
	ChromiumWidth = size[0];
	ChromiumHeight = size[1];

	// get the ratio of the size of the native window to the cr window
	WidthRatio = (float)ChromiumWidth / (float)NativeWidth;
	HeightRatio = (float)ChromiumHeight / (float)NativeHeight;
	
	// output some debug information at the beginning
	if(DebugFlag)
	{
		DebugFlag = 0;
		crDebug("Native Window Handle = %d", NATIVEhwnd);
		crDebug("Native Width = %i", NativeWidth);
		crDebug("Native Height = %i", NativeHeight);
		crDebug("Chromium Width = %i", ChromiumWidth);
		crDebug("Chromium Height = %i", ChromiumHeight);
	}
		
	if (NATIVEhwnd) 
	{ 
		GetClientRect( NATIVEhwnd, &rect );
		GetCursorPos (&point);
		
		// make sure these coordinates are relative to the native window,
		// not the whole desktop
		ScreenToClient(NATIVEhwnd, &point);

		// calculate the new position of the virtual cursor
		pos[0] = (int)(point.x * WidthRatio);
		pos[1] = (int)((NativeHeight - point.y) * HeightRatio);
	}
	else 
	{
		pos[0] = 0;
		pos[1] = 0;
	}
}
开发者ID:boompig,项目名称:chromium,代码行数:56,代码来源:context.c


示例11: QueryVisBits

static int QueryVisBits(Display *dpy, XVisualInfo *vis)
{
	int visBits = 0;
	int foo, bar, return_val, value;
	unsigned int i;

	/* We can only query the OpenGL capabilities if we actually
	 * have a native OpenGL underneath us.  Without it, we can't
	 * get at all the actual OpenGL characteristics.
	 */
	if (!stub.haveNativeOpenGL) return 0;

	if (!stub.wsInterface.glXQueryExtension(dpy, &foo, &bar)) return 0;

	/* If we don't have the GLX_USE_GL attribute, we've failed. */
	return_val = stub.wsInterface.glXGetConfig(dpy, vis, GLX_USE_GL, &value);
	if (return_val) {
		crDebug("native glXGetConfig returned %d (%s) at %s line %d",
			return_val, glx_error_string(return_val), __FILE__, __LINE__);
		return 0;
	}
	if (value == 0) {
		crDebug("visual ID 0x%x doesn't support OpenGL at %s line %d",
			(int) vis->visual->visualid, __FILE__, __LINE__);
		return 0;
	}

	for (i = 0; i < sizeof(attrib_map)/sizeof(attrib_map[0]); i++) {
		return_val = stub.wsInterface.glXGetConfig(dpy, vis, attrib_map[i].gl_attrib, &value);
		if (return_val) {
			crDebug("native glXGetConfig(%s) returned %d (%s) at %s line %d",
				attrib_map[i].attrib_name, return_val, glx_error_string(return_val), __FILE__, __LINE__);
			return 0;
		}

		switch(attrib_map[i].test) {
			case TEST_TRUE:
				if (value)
					visBits |= attrib_map[i].match_vis_bits;
				break;

			case TEST_GREATER_0:
				if (value > 0)
					visBits |= attrib_map[i].match_vis_bits;
				break;

			default:
				crWarning("illegal attribute map test for %s at %s line %d", 
					attrib_map[i].attrib_name, __FILE__, __LINE__);
				return 0;
		}
	}

	return visBits;
}
开发者ID:alown,项目名称:chromium,代码行数:55,代码来源:glx.c


示例12: DrvValidateVersion

BOOL APIENTRY DrvValidateVersion(DWORD version)
{
    CR_DDI_PROLOGUE();
    if (stubInit()) {
        crDebug("DrvValidateVersion %x -> TRUE\n", version);
        return TRUE;
    }

    crDebug("DrvValidateVersion %x -> FALSE, going to use system default opengl32.dll\n", version);
    return FALSE;
}
开发者ID:marktsai0316,项目名称:VirtualMonitor,代码行数:11,代码来源:icd_drv.c


示例13: getWindowGeometry

static GLboolean
getWindowGeometry(GLint *x, GLint *y, GLint *w, GLint *h)
{
	GLboolean retVal = GL_FALSE;
	ErrorFunc prev = XSetErrorHandler(handler);

	if (!windowtracker_spu.dpy) {
		windowtracker_spu.dpy = XOpenDisplay(windowtracker_spu.display);
	}
	if (windowtracker_spu.dpy) {
		Display *dpy = windowtracker_spu.dpy;
		if (!windowtracker_spu.win
				&& windowtracker_spu.window_title
				&& windowtracker_spu.window_title[0]) {
			crDebug("Window Tracker SPU: Looking for window %s",
							windowtracker_spu.window_title);
			windowtracker_spu.win = findWindowByTitle(dpy,
																								DefaultScreen(dpy),
																								DefaultRootWindow(dpy),
																								windowtracker_spu.window_title);
			if (windowtracker_spu.win) {
				crDebug("Window Tracker SPU: found window ID %u (0x%x)",
								(unsigned int) windowtracker_spu.win,
								(unsigned int) windowtracker_spu.win);
			}
		}
		if (windowtracker_spu.win) {
			Window root, child;
			unsigned int width, height, border, depth;
			if (XGetGeometry(windowtracker_spu.dpy, windowtracker_spu.win, &root,
											 x, y, &width, &height, &border, &depth)) {
				int rx, ry;
				if (XTranslateCoordinates(dpy,
																	windowtracker_spu.win,  /* from */
																	DefaultRootWindow(dpy), /* to */
																	*x, *y, &rx, &ry, &child)) {
					*x = rx;
					*y = ry;
				}
				*w = width;
				*h = height;
				retVal = GL_TRUE;
			}
		}
	}

	XSetErrorHandler(prev);

	if (ErrorCaught) {
		crError("Window Tracker SPU: invalid window handle.  Exiting.");
	}

	return retVal;
}
开发者ID:alown,项目名称:chromium,代码行数:54,代码来源:windowtrackerspu.c


示例14: __attribute__

void __attribute__ ((constructor)) vbox_install_into_mesa(void)
{
    {
#ifdef _X_ATTRIBUTE_PRINTF
        void (*pxf86Msg)(MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(2,3);
#else
        void (*pxf86Msg)(MessageType type, const char *format, ...) _printf_attribute(2,3);
#endif

        pxf86Msg = dlsym(RTLD_DEFAULT, "xf86Msg");
        if (pxf86Msg)
        {
            pxf86Msg(X_INFO, "Next line is added to allow vboxvideo_drv.so to appear as whitelisted driver\n");
            pxf86Msg(X_INFO, "The file referenced, is *NOT* loaded\n");
            pxf86Msg(X_INFO, "Loading %s/ati_drv.so\n", DRI_XORG_DRV_DIR);

            /* we're failing to proxy software dri driver calls for certain xservers, so just make sure we're unloaded for now */
            __driDriverExtensions[0] = NULL;
            return;
        }
    }

    if (!stubInit())
    {
        crDebug("vboxdriInitScreen: stubInit failed");
        return;
    }

    /* Load swrast_dri.so to proxy dri related calls there. */
    if (!vbox_load_sw_dri())
    {
        crDebug("vboxdriInitScreen: vbox_load_sw_dri failed...going to fail badly");
        return;
    }

    /* Handle gl api.
     * In the end application call would look like this:
     * app call glFoo->(mesa asm dispatch stub)->cr_glFoo(vbox asm dispatch stub)->SPU Foo function(packspuFoo or alike)
     * Note, we don't need to install extension functions via _glapi_add_dispatch, because we'd override glXGetProcAddress.
     */
    /* Mesa's dispatch table is different across library versions, have to modify mesa's table using offset info functions*/
    vboxPatchMesaGLAPITable();

    /* Handle glx api.
     * In the end application call would look like this:
     * app call glxFoo->(mesa asm dispatch stub patched with vbox_glXFoo:jmp glxim[Foo's index])->VBOXGLXTAG(glxFoo)
     */
    /* Fill structure used by our assembly stubs */
    vboxFillGLXAPITable(&glxim);
    /* Now patch functions exported by libGL.so */
    vboxPatchMesaExports();
}
开发者ID:tonado,项目名称:vbox,代码行数:52,代码来源:fakedri_drv.c


示例15: renderspu_SystemMakeCurrent

void
renderspu_SystemMakeCurrent(WindowInfo *window, GLint nativeWindow,
                            ContextInfo *context)
{
    Boolean result;
/*    DEBUG_MSG_POETZSCH (("makecurrent %d: \n", window->BltInfo.Base.id));*/

    CRASSERT(render_spu.ws.aglSetCurrentContext);
    //crDebug( "renderspu_SystemMakeCurrent( %x, %i, %x )", window, nativeWindow, context );

    nativeWindow = 0;

    if(window && context)
    {
        CRASSERT(window->window);
        CRASSERT(context->context);

        if(window->visual != context->visual)
        {
            crDebug("Render SPU (renderspu_SystemMakeCurrent): MakeCurrent visual mismatch (0x%x != 0x%x); remaking window.",
                    (uint)window->visual->visAttribs, (uint)context->visual->visAttribs);
            /*
             * XXX have to revisit this issue!!!
             *
             * But for now we destroy the current window
             * and re-create it with the context's visual abilities
             */
            renderspu_SystemDestroyWindow(window);
            renderspu_SystemCreateWindow(context->visual, window->visible,
                                         window);
        }

        /* This is the normal case: rendering to the render SPU's own window */
        result = renderspuWindowAttachContext(window, window->window,
                                              context);
        /* XXX this is a total hack to work around an NVIDIA driver bug */
        if(render_spu.self.GetFloatv && context->haveWindowPosARB)
        {
            GLfloat f[4];
            render_spu.self.GetFloatv(GL_CURRENT_RASTER_POSITION, f);
            if (!window->everCurrent || f[1] < 0.0)
            {
                crDebug("Render SPU (renderspu_SystemMakeCurrent): Resetting raster pos");
                render_spu.self.WindowPos2iARB(0, 0);
            }
        }
        /* Reapply the visible regions */
        renderspu_SystemWindowApplyVisibleRegion(window);
    }
    else
        renderspuWindowAttachContext (0, 0, 0);
}
开发者ID:gvsurenderreddy,项目名称:virtualbox,代码行数:52,代码来源:renderspu_agl.c


示例16: renderspu_SystemShowWindow

/* Either show or hide the render SPU's window. */
void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt )
{
    if (showIt)
    {
        crDebug("SHOW renderspu_SystemShowWindow: %x", window->hWnd);
        ShowWindow( window->hWnd, SW_SHOWNORMAL );
    }
    else
    {
        crDebug("HIDE renderspu_SystemShowWindow: %x", window->hWnd);
        ShowWindow( window->hWnd, SW_HIDE );
    }
}
开发者ID:greg100795,项目名称:virtualbox,代码行数:14,代码来源:renderspu_wgl.c


示例17: crServerDispatchBarrierExecCR

void SERVER_DISPATCH_APIENTRY crServerDispatchBarrierExecCR( GLuint name )
{
	CRServerBarrier *barrier;
#if DEBUG_BARRIERS
	char debug_buf[4096];
#endif

	if (cr_server.ignore_papi)
	{
		cr_server.head_spu->dispatch_table.BarrierExecCR( name );
		return;
	}

	barrier = (CRServerBarrier *) crHashtableSearch( cr_server.barriers, name );
	if ( barrier == NULL )
	{
		crError( "crServerDispatchBarrierExec: No such barrier: %d", name );
	}

#if DEBUG_BARRIERS
	sprintf( debug_buf, "BarrierExec( %d )", name );
	cr_server.head_spu->dispatch_table.ChromiumParametervCR( GL_PRINT_STRING_CR, GL_UNSIGNED_BYTE, sizeof(debug_buf), debug_buf );
	sprintf( debug_buf, "num_waiting = %d", barrier->num_waiting );
	cr_server.head_spu->dispatch_table.ChromiumParametervCR( GL_PRINT_STRING_CR, GL_UNSIGNED_BYTE, sizeof(debug_buf), debug_buf );
#endif

	barrier->waiting[barrier->num_waiting++] = cr_server.run_queue;

	cr_server.run_queue->blocked = 1;

	if ( barrier->num_waiting == barrier->count )
	{
		GLuint i;

		if (cr_server.debug_barriers)
			crDebug("crserver: BarrierExec(client=%p, id=%d, num_waiting=%d/%d) - release",
							cr_server.curClient, name, barrier->num_waiting,
							barrier->count);

		for ( i = 0; i < barrier->count; i++ )
		{
			barrier->waiting[i]->blocked = 0;
		}
		barrier->num_waiting = 0;
	}
	else if (cr_server.debug_barriers)
		crDebug("crserver: BarrierExec(client=%p, id=%d, num_waiting=%d/%d) - block",
						cr_server.curClient, name, barrier->num_waiting,
						barrier->count);

}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:51,代码来源:server_papi.c


示例18: PrintRegion

void
PrintRegion(const char *s, const RegionPtr r)
{
	const BoxPtr rects = REGION_RECTS(r);
	GLint n = REGION_NUM_RECTS(r), i;
	crDebug("Region %s (data at %p rects at %p)",
					s, (void*) r->data, (void*) rects);
	if (n == 0)
		crDebug("  EMPTY");
	for (i = 0; i < n; i++) {
		crDebug("  Rect %d: %d, %d .. %d, %d", i, rects[i].x1, rects[i].y1,
						rects[i].x2, rects[i].y2);
	}
}
开发者ID:alown,项目名称:chromium,代码行数:14,代码来源:vncspu.c


示例19: PrintQueue

static int
PrintQueue(void)
{
	RunQueue *q = cr_server.run_queue;
	int count = 0;
	crDebug("Queue entries:");
	while (q) {
		count++;
		crDebug("Entry: %p  client: %p", q, q->client);
		q = q->next;
		if (q == cr_server.run_queue)
			return count;
	}
	return count;
}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:15,代码来源:server_stream.c


示例20: crSDPUserbufRecv

/* returns the amt of pending data which was handled */ 
static int
crSDPUserbufRecv(CRConnection *conn, CRMessage *msg)
{
	unsigned long buf[2];
	int len;
  
	switch (msg->header.type)
	{
	case CR_MESSAGE_GATHER:
		/* grab the offset and the length */
		len = 2*sizeof(unsigned long);
		if (__sdp_read_exact(conn->sdp_socket, buf, len) <= 0)
		{
			__sdp_dead_connection( conn );
		}
		msg->gather.offset = buf[0];
		msg->gather.len = buf[1];
    
		/* read the rest into the userbuf */
		if (buf[0]+buf[1] > (unsigned long) conn->userbuf_len)
		{
			crDebug("userbuf for Gather Message is too small!");
			return len;
		}
		
		if (__sdp_read_exact(conn->sdp_socket, conn->userbuf+buf[0], buf[1]) <= 0)
		{
			__sdp_dead_connection( conn );
		}
		return len+buf[1];
    
	default:
		return 0;
	}
}
开发者ID:boompig,项目名称:chromium,代码行数:36,代码来源:sdp.c



注:本文中的crDebug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ crError函数代码示例发布时间:2022-05-30
下一篇:
C++ crDELAY函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap