- Timestamp:
- Mar 21, 2000, 8:46:47 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r2853 r3184 1 /* $Id: dibsect.cpp,v 1.2 0 2000-02-21 20:26:45sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.21 2000-03-21 19:46:47 sandervl Exp $ */ 2 2 3 3 /* … … 23 23 #include "dibsect.h" 24 24 #include <vmutex.h> 25 #include <win32api.h> 25 26 #include <winconst.h> 26 27 #include <win32wnd.h> 28 #include <cpuhlp.h> 27 29 #include "oslibgpi.h" 30 #include "rgbcvt.h" 28 31 29 32 #define DBG_LOCALLOG DBG_dibsect 30 33 #include "dbglocal.h" 31 32 //Win32 apis used:33 HWND WIN32API WindowFromDC(HDC hdc);34 BOOL WINAPI UnmapViewOfFile(LPVOID addr);35 LPVOID WINAPI MapViewOfFile(HANDLE mapping, DWORD access, DWORD offset_high,36 DWORD offset_low, DWORD count);37 34 38 35 static VMutex dibMutex; … … 329 326 POINTL point[4]; 330 327 LONG rc; 328 PVOID bitmapBits = NULL; 331 329 332 330 HWND hwndDest = WindowFromDC(hdcDest); … … 381 379 #endif 382 380 383 rc = GpiDrawBits(hps, bmpBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, BBO_OR); 381 //SvL: Optimize this.. (don't convert entire bitmap if only a part will be blitted to the dc) 382 if(dibinfo.dsBitfields[1] == 0x3E0) {//RGB 555? 383 dprintf(("DIBSection::BitBlt; convert rgb 555 to 565")); 384 385 bitmapBits = (WORD *)malloc(pOS2bmp->cbImage); 386 if(CPUFeatures & CPUID_MMX) { 387 RGB555to565MMX((WORD *)bitmapBits, (WORD *)bmpBits, pOS2bmp->cbImage/sizeof(WORD)); 388 } 389 else RGB555to565((WORD *)bitmapBits, (WORD *)bmpBits, pOS2bmp->cbImage/sizeof(WORD)); 390 rc = GpiDrawBits(hps, bitmapBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, BBO_OR); 391 free(bitmapBits); 392 } 393 else rc = GpiDrawBits(hps, bmpBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, BBO_OR); 384 394 385 395 if(hwndDest != 0)
Note:
See TracChangeset
for help on using the changeset viewer.