Subversion Repositories Kolibri OS

Rev

Rev 3263 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3263 Rev 3266
Line 30... Line 30...
30
      :"memory","cc");
30
      :"memory","cc");
Line 31... Line 31...
31
 
31
 
32
  return retval;
32
  return retval;
Line -... Line 33...
-
 
33
};
-
 
34
 
-
 
35
static inline void get_proc_info(char *info)
-
 
36
{
-
 
37
    __asm__ __volatile__(
-
 
38
    "int $0x40"
-
 
39
    :
-
 
40
    :"a"(9), "b"(info), "c"(-1));
33
};
41
}
34
 
42
 
Line 35... Line 43...
35
const struct intel_device_info *
43
const struct intel_device_info *
Line 334... Line 342...
334
{
342
{
335
    struct sna_copy_op copy;
343
    struct sna_copy_op copy;
336
    struct _Pixmap src, dst;
344
    struct _Pixmap src, dst;
337
    struct kgem_bo *src_bo;
345
    struct kgem_bo *src_bo;
Line -... Line 346...
-
 
346
 
-
 
347
    char proc_info[1024];
-
 
348
    int winx, winy;
-
 
349
 
-
 
350
    get_proc_info(proc_info);
-
 
351
 
-
 
352
    winx = *(uint32_t*)(proc_info+34);
-
 
353
    winy = *(uint32_t*)(proc_info+38);
338
 
354
    
339
    memset(&src, 0, sizeof(src));
355
    memset(&src, 0, sizeof(src));
Line 340... Line 356...
340
    memset(&dst, 0, sizeof(dst));
356
    memset(&dst, 0, sizeof(dst));
341
 
357
 
Line 353... Line 369...
353
    
369
    
354
    if( sna_device->render.copy(sna_device, GXcopy,
370
    if( sna_device->render.copy(sna_device, GXcopy,
355
                                &src, src_bo,
371
                                &src, src_bo,
356
                                &dst, sna_fb.fb_bo, ©) )
372
                                &dst, sna_fb.fb_bo, ©) )
357
    {                            
373
    {                            
358
    copy.blt(sna_device, ©, src_x, src_y, w, h, dst_x, dst_y);
374
        copy.blt(sna_device, ©, src_x, src_y, w, h, winx+dst_x, winy+dst_y);
359
    copy.done(sna_device, ©);
375
    copy.done(sna_device, ©);
Line 360... Line 376...
360
    }
376
    }
Line 388... Line 404...
388
err_2:
404
err_2:
389
    kgem_bo_destroy(&sna_device->kgem, bo);
405
    kgem_bo_destroy(&sna_device->kgem, bo);
Line 390... Line 406...
390
    
406
    
391
err_1:
407
err_1:
-
 
408
    return -1;        
392
    return -1;        
409
           
-
 
410
};
-
 
411
 
-
 
412
void sna_lock_bitmap(bitmap_t *bitmap)
-
 
413
{
-
 
414
	struct kgem_bo *bo;
-
 
415
    
-
 
416
    bo = (struct kgem_bo *)bitmap->handle;
-
 
417
        
-
 
418
    kgem_bo_sync__cpu(&sna_device->kgem, bo);
-
 
419
 
-
 
420
};
-
 
421
 
-
 
422
 
393
};
423
 
Line 394... Line 424...
394
/*
424
/*
395
 
425
 
396
int sna_blit_tex(bitmap_t *dst_bitmap, int dst_x, int dst_y,
426
int sna_blit_tex(bitmap_t *dst_bitmap, int dst_x, int dst_y,