DFBResult IGraphicsState_Real__Blit2( CoreGraphicsState *obj, const DFBRectangle *rects, const DFBPoint *points1, const DFBPoint *points2, u32 num ) { D_DEBUG_AT( DirectFB_CoreGraphicsState, "%s()\n", __FUNCTION__ ); D_ASSERT( rects != NULL ); D_ASSERT( points1 != NULL ); D_ASSERT( points2 != NULL ); if (!obj->state.destination || !obj->state.source || !obj->state.source2) return DFB_NOCONTEXT; if ((obj->state.blittingflags & (DSBLIT_SRC_MASK_ALPHA | DSBLIT_SRC_MASK_COLOR)) && !obj->state.source_mask) return DFB_NOCONTEXT; // FIXME: remove casts dfb_gfxcard_batchblit2( (DFBRectangle*) rects, (DFBPoint*) points1, (DFBPoint*) points2, num, &obj->state ); return DFB_OK; }
DFBResult CoreGraphicsStateClient_Blit2( CoreGraphicsStateClient *client, const DFBRectangle *rects, const DFBPoint *points1, const DFBPoint *points2, unsigned int num ) { D_DEBUG_AT( Core_GraphicsStateClient, "%s( client %p )\n", __FUNCTION__, client ); D_MAGIC_ASSERT( client, CoreGraphicsStateClient ); D_ASSERT( rects != NULL ); D_ASSERT( points1 != NULL ); D_ASSERT( points2 != NULL ); if (!dfb_config->call_nodirect && (dfb_core_is_master( client->core ) || !fusion_config->secure_fusion)) { // FIXME: will overwrite rects, points dfb_gfxcard_batchblit2( (DFBRectangle*) rects, (DFBPoint*) points1, (DFBPoint*) points2, num, client->state ); } else { DFBResult ret; CoreGraphicsStateClient_Update( client, DFXL_BLIT2, client->state ); ret = CoreGraphicsState_Blit2( client->gfx_state, rects, points1, points2, num ); if (ret) return ret; } return DFB_OK; }