Actually commit the change to ReadBitmap()...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16594 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2006-03-06 00:23:16 +00:00
parent ee18c3ccff
commit 2a6e97186b
1 changed files with 4 additions and 7 deletions

View File

@ -1148,13 +1148,10 @@ DrawingEngine::ReadBitmap(ServerBitmap *bitmap, bool drawCursor, BRect bounds)
bounds = bounds & clip;
fGraphicsCard->HideSoftwareCursor(bounds);
int32 bytesPerRow = buffer->BytesPerRow();
int32 bitsLength = bytesPerRow * (bounds.IntegerHeight() + 1);
uint8 *bits = (uint8 *)buffer->Bits();
bits += (uint32)bounds.top * bytesPerRow + (uint32)bounds.left * 4;
status_t result = bitmap->ImportBits(bits, bitsLength, bytesPerRow,
buffer->ColorSpace());
status_t result = bitmap->ImportBits(buffer->Bits(),
buffer->BitsLength(), buffer->BytesPerRow(), buffer->ColorSpace(),
bounds.LeftTop(), BPoint(0, 0), bounds.IntegerWidth(),
bounds.IntegerHeight());
if (drawCursor) {
// ToDo: blend the cursor