a few cosmetic changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -101,6 +101,7 @@ HWInterface::GetCursorPosition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Invalidate
|
// Invalidate
|
||||||
|
// * the object needs to be already locked!
|
||||||
status_t
|
status_t
|
||||||
HWInterface::Invalidate(const BRect& frame)
|
HWInterface::Invalidate(const BRect& frame)
|
||||||
{
|
{
|
||||||
@@ -138,21 +139,21 @@ HWInterface::CopyBackToFront(const BRect& frame)
|
|||||||
uint8* src = (uint8*)backBuffer->Bits();
|
uint8* src = (uint8*)backBuffer->Bits();
|
||||||
|
|
||||||
// convert to integer coordinates
|
// convert to integer coordinates
|
||||||
int32 x = (int32)floorf(area.left);
|
int32 left = (int32)floorf(area.left);
|
||||||
int32 y = (int32)floorf(area.top);
|
int32 top = (int32)floorf(area.top);
|
||||||
int32 right = (int32)ceilf(area.right);
|
int32 right = (int32)ceilf(area.right);
|
||||||
int32 bottom = (int32)ceilf(area.bottom);
|
int32 bottom = (int32)ceilf(area.bottom);
|
||||||
|
|
||||||
// offset to left top pixel in source buffer (always B_RGBA32)
|
// offset to left top pixel in source buffer (always B_RGBA32)
|
||||||
src += y * srcBPR + x * 4;
|
src += top * srcBPR + left * 4;
|
||||||
|
|
||||||
_CopyToFront(src, srcBPR, x, y, right, bottom);
|
|
||||||
|
|
||||||
|
_CopyToFront(src, srcBPR, left, top, right, bottom);
|
||||||
_DrawCursor(area);
|
_DrawCursor(area);
|
||||||
}
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// _CopyToFront
|
// _CopyToFront
|
||||||
@@ -253,6 +254,10 @@ HWInterface::_CopyToFront(uint8* src, uint32 srcBPR,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_CMAP8: {
|
case B_CMAP8: {
|
||||||
|
// TODO: make this work on Haiku, the problem is only
|
||||||
|
// the rgb_color->index mapping, there is an implementation
|
||||||
|
// in Bitmap.cpp, maybe it needs to be moved to a public
|
||||||
|
// place...
|
||||||
#ifndef __HAIKU__
|
#ifndef __HAIKU__
|
||||||
// offset to left top pixel in dest buffer
|
// offset to left top pixel in dest buffer
|
||||||
dst += y * dstBPR + x;
|
dst += y * dstBPR + x;
|
||||||
|
|||||||
Reference in New Issue
Block a user