Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4377 → Rev 4375

/contrib/sdk/sources/Intel-2D/pixdriver.h
File deleted
/contrib/sdk/sources/Intel-2D/sna/sna.c
46,8 → 46,6
#include "sna_reg.h"
 
#include <pixlib2.h>
#include "../pixdriver.h"
 
#include <kos32sys.h>
 
#define to_surface(x) (surface_t*)((x)->handle)
59,6 → 57,20
int b;
} rect_t;
 
struct pix_driver
{
char *name;
 
int (*create_bitmap)(bitmap_t * bitmap);
int (*destroy_bitmap)(bitmap_t * bitmap);
int (*lock_bitmap)(bitmap_t * bitmap);
int (*blit)(bitmap_t * bitmap, bool scale, int dst_x, int dst_y,
int w, int h, int src_x, int src_y);
int (*resize_bitmap)(bitmap_t * bitmap);
void (*fini)(void);
};
 
 
static struct sna_fb sna_fb;
static int tls_mask;
 
679,7 → 691,7
 
full_height = y1 == 0 && y2 == crtc->b - crtc->t;
 
pipe = sna_fb.pipe;
pipe = 0;
DBG(("%s: pipe=%d, y1=%d, y2=%d, full_height?=%d\n",
__FUNCTION__, pipe, y1, y2, full_height));
 
1080,8 → 1092,8
 
 
 
int sna_blit_tex(bitmap_t *bitmap, int scale, int vsync,
int dst_x, int dst_y,int w, int h, int src_x, int src_y)
int sna_blit_tex(bitmap_t *bitmap, bool scale, int dst_x, int dst_y,
int w, int h, int src_x, int src_y)
 
{
surface_t *sf = to_surface(bitmap);
1153,7 → 1165,7
 
__lock_acquire_recursive(__sna_lock);
 
if(vsync)
#if 0
{
rect_t crtc, clip;
 
1170,6 → 1182,7
kgem_set_mode(&sna_device->kgem, KGEM_RENDER, sna_fb.fb_bo);
sna_wait_for_scanline(sna_device, &crtc, &clip);
}
#endif
 
if( sna_device->render.blit_tex(sna_device, PictOpSrc,scale,
&src, src_bo,
1210,6 → 1223,8
 
static void sna_fini()
{
ENTER();
 
if( sna_device )
{
struct kgem_bo *mask;
1227,6 → 1242,7
sna_device = NULL;
__lock_release_recursive(__sna_lock);
};
LEAVE();
}
 
uint32_t DrvInit(uint32_t service, struct pix_driver *driver)
/contrib/sdk/sources/Intel-2D/sna/sna.h
391,8 → 391,6
uint32_t height;
uint32_t pitch;
uint32_t tiling;
uint32_t crtc;
uint32_t pipe;
 
struct kgem_bo *fb_bo;
};
/contrib/sdk/sources/Intel-2D/Makefile
69,7 → 69,7
 
# targets
 
all:$(LIBRARY).dll intel-sna.drv
all:$(LIBRARY).dll intel-sna.drv intel-uxa.drv
uxa:$(LIBRARY).dll
ebox:$(LIBRARY).dll
 
/contrib/sdk/sources/Intel-2D/pixlib.c
5,13 → 5,23
#include <malloc.h>
#include <stdbool.h>
#include <pixlib2.h>
#include "pixdriver.h"
 
#include <kos32sys.h>
 
void* load_library(const char *name);
 
struct pix_driver
{
char *name;
 
int (*create_bitmap)(bitmap_t * bitmap);
int (*destroy_bitmap)(bitmap_t * bitmap);
int (*lock_bitmap)(bitmap_t * bitmap);
int (*blit)(bitmap_t * bitmap, bool scale, int dst_x, int dst_y,
int w, int h, int src_x, int src_y);
int (*resize_bitmap)(bitmap_t * bitmap);
void (*fini)(void);
};
 
#define DISPLAY_VERSION 0x0200 /* 2.00 */
 
#define SRV_GETVERSION 0
192,7 → 202,7
surface_t *sf = to_surface(bitmap);
 
if (sf->flags & hw_caps & HW_BIT_BLIT)
return pix_driver.blit(bitmap, 0, 0, dst_x, dst_y, w, h, src_x, src_y);
return pix_driver.blit(bitmap, false, dst_x, dst_y, w, h, src_x, src_y);
 
bc.dstx = dst_x;
bc.dsty = dst_y;
223,7 → 233,7
surface_t *sf = to_surface(bitmap);
 
if (sf->flags & hw_caps & HW_TEX_BLIT)
return pix_driver.blit(bitmap, 1, 1, dst_x, dst_y, w, h, 0, 0);
return pix_driver.blit(bitmap, true, dst_x, dst_y, w, h, 0, 0);
 
bc.dstx = dst_x;
bc.dsty = dst_y;