- Timestamp:
- Dec 23, 2009, 1:02:06 AM (15 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r434 r437 411 411 extern unsigned long long qt_total_blit_ms; 412 412 extern unsigned long long qt_total_blit_pixels; 413 printf("*** qt_total_blit_ms %llu\n"414 "*** qt_total_blit_pixels %llu\n"415 "*** speed %llu pixels/ms",413 printf("*** qt_total_blit_ms %llu\n" 414 "*** qt_total_blit_pixels %llu\n" 415 "*** ", 416 416 qt_total_blit_ms, qt_total_blit_pixels, 417 417 qt_total_blit_pixels / qt_total_blit_ms); -
trunk/src/gui/painting/qwindowsurface_raster.cpp
r308 r437 70 70 #endif 71 71 72 73 74 75 76 77 78 79 72 80 QT_BEGIN_NAMESPACE 73 81 … … 225 233 #endif 226 234 227 #if 1 235 #if QT_BITMAP_MIRROR == 1 236 228 237 // flip the image vertically for PM 229 238 QImage img = d->image->image.mirrored(); … … 258 267 GpiDrawBits(wps, (PVOID) img.bits(), (PBITMAPINFO2) &bmh, 4, ptls, 259 268 ROP_SRCCOPY, BBO_IGNORE); 260 #else 269 270 #elif QT_BITMAP_MIRROR == 2 271 272 QPoint wOffset = qt_qwidget_data(widget)->wrect.topLeft(); 273 QRect wbr = br.translated(-wOffset); 274 275 br.translate(offset); 276 277 BITMAPINFOHEADER2 bmh; 278 memset(&bmh, 0, sizeof(BITMAPINFOHEADER2)); 279 bmh.cbFix = sizeof(BITMAPINFOHEADER2); 280 bmh.cPlanes = 1; 281 bmh.cBitCount = 32; // @todo support 8-bit indexed colors? 282 bmh.cx = d->image->width(); 283 bmh.cy = d->image->height(); 284 285 // Note: target is inclusive-inclusive, source is inclusive-exclusive 286 POINTL ptls[] = { { wbr.left(), wbr.top() }, 287 { wbr.right(), wbr.bottom() }, 288 { br.left(), br.top() }, 289 { br.right() + 1, br.bottom() + 1 } }; 290 #if 0 291 qDebug("QRasterWindowSurface::flush: [%s] ptls %ld,%ld-%ld,%ld %ld,%ld-%ld,%ld", 292 qWidgetName(widget).toUtf8().constData(), 293 ptls[0].x, ptls[0].y, ptls[1].x, ptls[1].y, 294 ptls[2].x, ptls[2].y, ptls[3].x, ptls[3].y); 295 #endif 296 297 // setup the Y coordinate inversion (this seems to use the same GPI matrix 298 // transformation internally as we do in method 3 below) 299 LONG oldInversion = GpiQueryYInversion(wps); 300 GpiEnableYInversion(wps, widget->height() - 1); 301 302 GpiDrawBits(wps, (PVOID) d->image->image.bits(), (PBITMAPINFO2) &bmh, 303 4, ptls, ROP_SRCCOPY, BBO_IGNORE); 304 305 GpiEnableYInversion(wps, oldInversion); 306 307 #elif QT_BITMAP_MIRROR == 3 308 261 309 // use the reflection + transformation matrix to flip the y axis. 262 310 // This should be slower than flipping the image ourselves (unless this … … 302 350 const QImage img = d->image->image; 303 351 #endif 352 353 354 304 355 #endif 305 356
Note:
See TracChangeset
for help on using the changeset viewer.