DFBResult CoreGraphicsStateClient_DrawRectangles( CoreGraphicsStateClient *client, const DFBRectangle *rects, unsigned int num ) { D_DEBUG_AT( Core_GraphicsStateClient, "%s( client %p )\n", __FUNCTION__, client ); D_MAGIC_ASSERT( client, CoreGraphicsStateClient ); D_ASSERT( rects != NULL ); if (!dfb_config->call_nodirect && (dfb_core_is_master( client->core ) || !fusion_config->secure_fusion)) { unsigned int i; for (i=0; i<num; i++) // FIXME: will overwrite rects dfb_gfxcard_drawrectangle( (DFBRectangle*) &rects[i], client->state ); } else { DFBResult ret; CoreGraphicsStateClient_Update( client, DFXL_DRAWRECTANGLE, client->state ); ret = CoreGraphicsState_DrawRectangles( client->gfx_state, rects, num ); if (ret) return ret; } return DFB_OK; }
DFBResult IGraphicsState_Real__DrawRectangles( CoreGraphicsState *obj, const DFBRectangle *rects, u32 num ) { D_DEBUG_AT( DirectFB_CoreGraphicsState, "%s()\n", __FUNCTION__ ); if (!obj->state.destination) return DFB_NOCONTEXT; for (u32 i=0; i<num; i++) dfb_gfxcard_drawrectangle( (DFBRectangle*) &rects[i], &obj->state ); return DFB_OK; }