本文整理匯總了C++中D_DEBUG_AT函數的典型用法代碼示例。如果您正苦於以下問題:C++ D_DEBUG_AT函數的具體用法?C++ D_DEBUG_AT怎麽用?C++ D_DEBUG_AT使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了D_DEBUG_AT函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: osdUnlock
static DFBResult
osdUnlock( CoreSurfacePool *pool,
void *pool_data,
void *pool_local,
CoreSurfaceAllocation *allocation,
void *alloc_data,
CoreSurfaceBufferLock *lock )
{
OSDAllocationData *alloc = alloc_data;
D_MAGIC_ASSERT( pool, CoreSurfacePool );
D_MAGIC_ASSERT( allocation, CoreSurfaceAllocation );
D_MAGIC_ASSERT( alloc, OSDAllocationData );
D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock );
D_DEBUG_AT( OSD_SurfLock, "%s( %p )\n", __FUNCTION__, lock->buffer );
(void) alloc;
return DFB_OK;
}
示例2: D_DEBUG_AT
DFBResult
ILayerContext_Real::FindWindowByResourceID(
u64 resource_id,
CoreWindow **ret_window
)
{
DFBResult ret;
CoreLayerContext *context = obj;
CoreWindowStack *stack;
FindWindowByResourceID_Context ctx;
D_DEBUG_AT( DirectFB_CoreLayerContext, "ILayerContext_Real::%s()\n", __FUNCTION__ );
D_ASSERT( ret_window != NULL );
stack = context->stack;
D_ASSERT( stack != NULL );
ctx.resource_id = resource_id;
ctx.window = NULL;
ret = (DFBResult) dfb_layer_context_lock( context );
if (ret)
return ret;
ret = dfb_wm_enum_windows( stack, FindWindowByResourceID_WindowCallback, &ctx );
if (ret == DFB_OK) {
if (ctx.window) {
ret = (DFBResult) dfb_window_ref( ctx.window );
if (ret == DFB_OK)
*ret_window = ctx.window;
}
else
ret = DFB_IDNOTFOUND;
}
dfb_layer_context_unlock( context );
return ret;
}
示例3: driver_init_device
static DFBResult
driver_init_device(CoreGraphicsDevice *device,
GraphicsDeviceInfo *device_info,
void *driver_data,
void *device_data)
{
const char *renderer;
DFBResult status;
D_DEBUG_AT(GLES2__2D, "%s()\n", __FUNCTION__);
// Now that we have a connection and can query GLES.
renderer = (const char*)glGetString(GL_RENDERER);
// Fill device info.
snprintf(device_info->vendor,
DFB_GRAPHICS_DEVICE_INFO_VENDOR_LENGTH, "%s", "GLES2 Acceleration -");
snprintf(device_info->name,
DFB_GRAPHICS_DEVICE_INFO_NAME_LENGTH, "%s", renderer ?: "Unknown");
// Initialize shader program objects, shared across all EGL contexts.
status = gles2_init_shader_programs((GLES2DeviceData *)device_data);
if (status != DFB_OK) {
D_ERROR("GLES2/Driver: Could not create shader program objects!\n");
return status;
}
/* device limitations */
device_info->limits.surface_byteoffset_alignment = 8;
device_info->limits.surface_bytepitch_alignment = 8;
device_info->caps.flags = CCF_CLIPPING | CCF_RENDEROPTS;
device_info->caps.accel = GLES2_SUPPORTED_DRAWINGFUNCTIONS |
GLES2_SUPPORTED_BLITTINGFUNCTIONS;
device_info->caps.drawing = GLES2_SUPPORTED_DRAWINGFLAGS;
device_info->caps.blitting = GLES2_SUPPORTED_BLITTINGFLAGS;
return DFB_OK;
}
示例4: surface_destructor
static void
surface_destructor( FusionObject *object, bool zombie, void *ctx )
{
int i;
CoreSurface *surface = (CoreSurface*) object;
D_MAGIC_ASSERT( surface, CoreSurface );
D_DEBUG_AT( Core_Surface, "destroying %p (%dx%d%s)\n", surface,
surface->config.size.w, surface->config.size.h, zombie ? " ZOMBIE" : "");
dfb_surface_lock( surface );
surface->state |= CSSF_DESTROYED;
/* announce surface destruction */
dfb_surface_notify( surface, CSNF_DESTROY );
/* unlink palette */
if (surface->palette) {
dfb_palette_detach_global( surface->palette, &surface->palette_reaction );
dfb_palette_unlink( &surface->palette );
}
/* destroy buffers */
for (i=0; i<MAX_SURFACE_BUFFERS; i++) {
if (surface->buffers[i])
dfb_surface_buffer_destroy( surface->buffers[i] );
}
direct_serial_deinit( &surface->serial );
dfb_surface_unlock( surface );
fusion_skirmish_destroy( &surface->lock );
D_MAGIC_CLEAR( surface );
fusion_object_destroy( object );
}
示例5: drmkmsInitLayer
static DFBResult
drmkmsInitLayer( CoreLayer *layer,
void *driver_data,
void *layer_data,
DFBDisplayLayerDescription *description,
DFBDisplayLayerConfig *config,
DFBColorAdjustment *adjustment )
{
DRMKMSData *drmkms = driver_data;
DRMKMSDataShared *shared = drmkms->shared;
DRMKMSLayerData *data = layer_data;
D_DEBUG_AT( DRMKMS_Layer, "%s()\n", __FUNCTION__ );
data->index = shared->layerplane_index_count++;
data->layer_index = shared->layer_index_count++;
data->level = 0;
description->type = DLTF_GRAPHICS;
description->caps = DLCAPS_SURFACE;
description->surface_caps = DSCAPS_NONE;
description->surface_accessor = CSAID_LAYER0;
direct_snputs( description->name, "DRMKMS Layer", DFB_DISPLAY_LAYER_DESC_NAME_LENGTH );
config->flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE;
config->width = dfb_config->mode.width ?: shared->mode[data->layer_index].hdisplay;
config->height = dfb_config->mode.height ?: shared->mode[data->layer_index].vdisplay;
config->pixelformat = dfb_config->mode.format ?: DSPF_ARGB;
config->buffermode = DLBM_FRONTONLY;
direct_mutex_init( &data->lock );
direct_waitqueue_init( &data->wq_event );
return DFB_OK;
}
示例6: Construct
static DirectResult
Construct( void *interface, ... )
{
DFBResult ret = DFB_INVARG;
ICoreResourceManager *thiz = interface;
CoreDFB *core;
DIRECT_ALLOCATE_INTERFACE_DATA(thiz, ICoreResourceManager_test)
D_DEBUG_AT( ICoreResourceManager_test, "%s( %p )\n", __FUNCTION__, thiz );
va_list tag;
va_start(tag, interface);
core = va_arg(tag, CoreDFB *);
va_end( tag );
/* Check arguments. */
if (!thiz)
goto error;
/* Initialize interface data. */
data->ref = 1;
data->core = core;
/* Initialize function pointer table. */
thiz->AddRef = ICoreResourceManager_test_AddRef;
thiz->Release = ICoreResourceManager_test_Release;
thiz->CreateClient = ICoreResourceManager_test_CreateClient;
return DFB_OK;
error:
DIRECT_DEALLOCATE_INTERFACE(thiz);
return ret;
}
示例7: validate_clip
static inline void
validate_clip( CardState *state,
int xmax,
int ymax,
bool warn )
{
D_DEBUG_AT( Core_GfxState, "%s( %p, %d, %d, %d )\n", __FUNCTION__, state, xmax, ymax, warn );
D_MAGIC_ASSERT( state, CardState );
DFB_REGION_ASSERT( &state->clip );
D_ASSERT( xmax >= 0 );
D_ASSERT( ymax >= 0 );
D_ASSERT( state->clip.x1 <= state->clip.x2 );
D_ASSERT( state->clip.y1 <= state->clip.y2 );
if (state->clip.x1 <= xmax &&
state->clip.y1 <= ymax &&
state->clip.x2 <= xmax &&
state->clip.y2 <= ymax)
return;
if (warn)
D_WARN( "Clip %d,%d-%dx%d invalid, adjusting to fit %dx%d",
DFB_RECTANGLE_VALS_FROM_REGION( &state->clip ), xmax+1, ymax+1 );
if (state->clip.x1 > xmax)
state->clip.x1 = xmax;
if (state->clip.y1 > ymax)
state->clip.y1 = ymax;
if (state->clip.x2 > xmax)
state->clip.x2 = xmax;
if (state->clip.y2 > ymax)
state->clip.y2 = ymax;
state->modified |= SMF_CLIP;
}
示例8: lite_load_cursor_from_desc
DFBResult
lite_load_cursor_from_desc(LiteCursor *cursor, DFBSurfaceDescription *dsc)
{
DFBResult res;
LITE_NULL_PARAMETER_CHECK(cursor);
LITE_NULL_PARAMETER_CHECK(dsc);
D_DEBUG_AT(LiteCursorDomain, "Load cursor from surface descriptor: %p\n", dsc);
res = lite_util_load_image_desc(&cursor->surface, dsc);
if (res != DFB_OK)
return res;
cursor->width = dsc->width;
cursor->height = dsc->height;
cursor->hot_x = 0;
cursor->hot_y = 0;
return res;
}
示例9: keyboard_process_event
static void
keyboard_process_event( UniqueDevice *device,
void *data,
void *ctx,
const DFBInputEvent *event )
{
UniqueInputEvent evt;
KeyboardData *keyboard = data;
(void) keyboard;
D_MAGIC_ASSERT( device, UniqueDevice );
D_MAGIC_ASSERT( keyboard, KeyboardData );
D_ASSERT( event != NULL );
D_DEBUG_AT( UniQuE_Keyboard, "keyboard_process_event( %p, %p, %p, %p ) <- type 0x%08x\n",
device, data, ctx, event, event->type );
switch (event->type) {
case DIET_KEYPRESS:
case DIET_KEYRELEASE:
evt.type = UIET_KEY;
evt.keyboard.device_id = event->device_id;
evt.keyboard.press = (event->type == DIET_KEYPRESS);
evt.keyboard.key_code = event->key_code;
evt.keyboard.key_id = event->key_id;
evt.keyboard.key_symbol = event->key_symbol;
evt.keyboard.modifiers = event->modifiers;
evt.keyboard.locks = event->locks;
unique_device_dispatch( device, &evt );
break;
default:
break;
}
}
示例10: D_DEBUG_AT
void *
VoodooDispatcher::DispatchLoop()
{
D_DEBUG_AT( Voodoo_Dispatcher, "VoodooDispatcher::%s( %p )\n", __func__, this );
direct_mutex_lock( &lock );
while (!manager->is_quit) {
VoodooPacket *packet;
D_MAGIC_ASSERT( this, VoodooDispatcher );
if (packets) {
packet = (VoodooPacket*) packets;
direct_list_remove( &packets, &packet->link );
manager->connection->WakeUp();
}
else {
direct_waitqueue_wait( &queue, &lock );
continue;
}
direct_mutex_unlock( &lock );
ProcessMessages( (VoodooMessageHeader*) packet->data_start(), packet->size() );
D_FREE( packet );
direct_mutex_lock( &lock );
}
direct_mutex_unlock( &lock );
return NULL;
}
示例11: davinci_validate_SOURCE_MULT
/*
* Called by davinciSetState() to ensure that the source ARGB modulation is properly set
* for execution of blitting functions.
*/
static inline void
davinci_validate_SOURCE_MULT( DavinciDeviceData *ddev,
CardState *state )
{
switch (ddev->dst_format) {
case DSPF_ARGB:
if (state->blittingflags & DSBLIT_COLORIZE)
ddev->source_mult = 0xff000000 | ddev->color_argb;
else
ddev->source_mult = 0xffffffff;
break;
default:
D_BUG( "unexpected format %s", dfb_pixelformat_name(ddev->dst_format) );
return;
}
D_DEBUG_AT( Davinci_2D, " => SOURCE_MULT: 0x%08lx\n", ddev->source_mult );
/* Set the flag. */
DAVINCI_VALIDATE( SOURCE_MULT );
}
示例12: IDirectFBDisplayLayer_GetLevel
static DFBResult
IDirectFBDisplayLayer_GetLevel( IDirectFBDisplayLayer *thiz,
int *level )
{
DFBResult ret;
int lvl;
D_DEBUG_AT( Layer, "%s( %p )\n", __FUNCTION__, thiz );
DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer)
if (!level)
return DFB_INVARG;
ret = dfb_layer_get_level( data->layer, &lvl );
if (ret)
return ret;
*level = lvl;
return DFB_OK;
}
示例13: IDirectFBDisplayLayer_SetDstColorKey
static DFBResult
IDirectFBDisplayLayer_SetDstColorKey( IDirectFBDisplayLayer *thiz,
u8 r,
u8 g,
u8 b )
{
DFBColorKey key;
D_DEBUG_AT( Layer, "%s( %p )\n", __FUNCTION__, thiz );
DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer)
if (data->level == DLSCL_SHARED)
return DFB_ACCESSDENIED;
key.r = r;
key.g = g;
key.b = b;
key.index = -1;
return CoreLayerContext_SetDstColorKey( data->context, &key );
}
示例14: IDirectFBWindow_RequestFocus
static DFBResult
IDirectFBWindow_RequestFocus( IDirectFBWindow *thiz )
{
CoreWindow *window;
DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
if (data->destroyed)
return DFB_DESTROYED;
window = data->window;
if (window->config.options & DWOP_GHOST)
return DFB_UNSUPPORTED;
if (!window->config.opacity && !(window->caps & DWCAPS_INPUTONLY))
return DFB_UNSUPPORTED;
return dfb_window_request_focus( window );
}
示例15: IDirectFBWindow_Bind
static DFBResult
IDirectFBWindow_Bind( IDirectFBWindow *thiz,
IDirectFBWindow *source,
int x,
int y )
{
IDirectFBWindow_data *source_data;
DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
if (data->destroyed)
return DFB_DESTROYED;
DIRECT_INTERFACE_GET_DATA_FROM(source, source_data, IDirectFBWindow);
if (source_data->destroyed)
return DFB_DESTROYED;
return dfb_window_bind( data->window, source_data->window, x, y );
}