moved acc function FILL_RECTANGLE into engine directly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16059 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2006-01-24 11:56:36 +00:00
parent f3c5d76035
commit 19fb0957a2
4 changed files with 37 additions and 24 deletions

View File

@ -12,25 +12,6 @@
#include "acc_std.h"
void FILL_RECTANGLE(engine_token *et, uint32 colorIndex, fill_rect_params *list, uint32 count) {
int i;
/*draw each rectangle*/
i=0;
while (count--)
{
gx00_acc_rectangle
(
list[i].left,
(list[i].right)+1,
list[i].top,
(list[i].bottom-list[i].top)+1,
colorIndex
);
i++;
}
}
void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count) {
int i;

View File

@ -45,7 +45,6 @@ void WAIT_ENGINE_IDLE(void);
status_t GET_SYNC_TOKEN(engine_token *et, sync_token *st);
status_t SYNC_TO_TOKEN(sync_token *st);
void FILL_RECTANGLE(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count);
void FILL_SPAN(engine_token *et, uint32 color, uint16 *list, uint32 count);

View File

@ -366,6 +366,41 @@ void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT(engine_token *et, scaled_blit_params
}
}
/* rectangle fill.
* Engine function rectangle_fill: paragraph 4.5.5.2 */
void FILL_RECTANGLE(engine_token *et, uint32 colorIndex, fill_rect_params *list, uint32 count)
{
/*
FXBNDRY - left and right coordinates a
YDSTLEN - y start and no of lines a
(or YDST and LEN)
DWGCTL - atype must be RSTR or BLK a
FCOL - foreground colour a
*/
int i = 0;
while (count--)
{
ACCW(FXBNDRY, (((list[i].right + 1) << 16) | list[i].left));
ACCW_YDSTLEN(list[i].top, ((list[i].bottom - list[i].top) + 1));
ACCW(FCOL, colorIndex);
/* start the fill */
//acc fixme: checkout blockmode constraints for G100+ (mil: nc?): also add blockmode
// for other functions, and use fastblt on MIL1/2 if possible...
//or is CMAP8 contraint a non-blockmode contraint? (linearisation problem maybe?)
if (si->dm.space==B_CMAP8 || si->ps.sdram)
{
ACCGO(DWGCTL, 0x400c7814); // atype RSTR
}
else
{
ACCGO(DWGCTL, 0x400c7844); // atype BLK
}
i++;
}
}
/* rectangle fill.
* Engine function rectangle_fill: paragraph 4.5.5.2 */
/*colorIndex,fill_rect_params,count*/

View File

@ -105,16 +105,14 @@ status_t g400_crtc2_dpms(bool display, bool h, bool v);
/*acceleration functions*/
status_t check_acc_capability(uint32 feature);
status_t gx00_acc_wait_idle(void);
status_t gx00_acc_init(void);
void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count);
void SCREEN_TO_SCREEN_TRANSPARENT_BLIT(engine_token *et, uint32 transparent_colour, blit_params *list, uint32 count);
void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT(engine_token *et, scaled_blit_params *list, uint32 count);
void FILL_RECTANGLE(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
status_t gx00_acc_rectangle(uint32 xs,uint32 xe,uint32 ys,uint32 yl,uint32 col);
status_t gx00_acc_rectangle_invert(uint32 xs,uint32 xe,uint32 ys,uint32 yl,uint32 col);
status_t gx00_acc_transparent_blit(uint16,uint16,uint16, uint16,uint16,uint16, uint32);
status_t gx00_acc_video_blit(uint16 xs,uint16 ys,uint16 ws, uint16 hs,
uint16 xd,uint16 yd,uint16 wd,uint16 hd);
status_t gx00_acc_wait_idle(void);
/*backend scaler functions*/
status_t check_overlay_capability(uint32 feature);