Since last checkin version had no description:
Huge amounts more debug output available Resolved several timing issues Fixed a major problem with sending mouse messages to the server when emulating the input server There are still stability issues with initial startup Still some drawing problems It *works*! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10981 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -347,6 +347,7 @@ void DirectDriver::SetMode(const display_mode &mode)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
STRACE(("DirectDriver::SetMode:invalid mode height\n"));
|
||||||
Unlock();
|
Unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -381,14 +382,28 @@ void DirectDriver::SetMode(const display_mode &mode)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// It would seem that everything passed the error check, so actually set the mode
|
// It would seem that everything passed the error check, so actually set the mode
|
||||||
|
DTRACE(("Locking screen window\n"));
|
||||||
screenwin->Lock();
|
screenwin->Lock();
|
||||||
|
|
||||||
|
DTRACE(("Hiding screen window\n"));
|
||||||
|
screenwin->Hide();
|
||||||
|
screenwin->Unlock();
|
||||||
|
|
||||||
|
DTRACE(("Locking screen window\n"));
|
||||||
|
screenwin->Lock();
|
||||||
|
|
||||||
|
DTRACE(("Quitting old screen window\n"));
|
||||||
screenwin->Quit();
|
screenwin->Quit();
|
||||||
|
|
||||||
|
DTRACE(("deleting framebuffer\n"));
|
||||||
delete framebuffer;
|
delete framebuffer;
|
||||||
|
|
||||||
|
DTRACE(("creating new framebuffer\n"));
|
||||||
framebuffer=new BBitmap(BRect(0,0,mode.virtual_width-1, mode.virtual_height-1),(color_space)mode.space,true);
|
framebuffer=new BBitmap(BRect(0,0,mode.virtual_width-1, mode.virtual_height-1),(color_space)mode.space,true);
|
||||||
drawview=new BView(framebuffer->Bounds(),"drawview",0,0);
|
drawview=new BView(framebuffer->Bounds(),"drawview",0,0);
|
||||||
framebuffer->AddChild(drawview);
|
framebuffer->AddChild(drawview);
|
||||||
|
|
||||||
|
DTRACE(("creating new window\n"));
|
||||||
screenwin=new DDWindow(mode.virtual_width, mode.virtual_height,(color_space)mode.space,this);
|
screenwin=new DDWindow(mode.virtual_width, mode.virtual_height,(color_space)mode.space,this);
|
||||||
while(find_thread("drawing_thread")==B_NAME_NOT_FOUND)
|
while(find_thread("drawing_thread")==B_NAME_NOT_FOUND)
|
||||||
{
|
{
|
||||||
@@ -999,6 +1014,7 @@ DDWindow::DDWindow(uint16 width, uint16 height, color_space space, DirectDriver
|
|||||||
fClipList=NULL;
|
fClipList=NULL;
|
||||||
fNumClipRects=0;
|
fNumClipRects=0;
|
||||||
fDirty=true;
|
fDirty=true;
|
||||||
|
fDrawThreadID=-1;
|
||||||
|
|
||||||
if(!owner)
|
if(!owner)
|
||||||
debugger("DDWindow requires a non-NULL owner.");
|
debugger("DDWindow requires a non-NULL owner.");
|
||||||
@@ -1028,8 +1044,8 @@ DDWindow::~DDWindow(void)
|
|||||||
int32 result;
|
int32 result;
|
||||||
|
|
||||||
fConnectionDisabled=true;
|
fConnectionDisabled=true;
|
||||||
Hide();
|
|
||||||
// Sync();
|
// Sync();
|
||||||
|
if(fDrawThreadID!=-1)
|
||||||
wait_for_thread(fDrawThreadID,&result);
|
wait_for_thread(fDrawThreadID,&result);
|
||||||
free(fClipList);
|
free(fClipList);
|
||||||
}
|
}
|
||||||
@@ -1150,6 +1166,8 @@ int32 DDWindow::DrawingThread(void *data)
|
|||||||
w->locker.Lock();
|
w->locker.Lock();
|
||||||
if(w->fConnected)
|
if(w->fConnected)
|
||||||
{
|
{
|
||||||
|
int32 winleft=(int32)w->Frame().left,wintop=(int32)w->Frame().top;
|
||||||
|
|
||||||
DTRACE(("\tcheck to see if window is dirty\n"));
|
DTRACE(("\tcheck to see if window is dirty\n"));
|
||||||
if(w->fDirty)
|
if(w->fDirty)
|
||||||
{
|
{
|
||||||
@@ -1158,7 +1176,6 @@ int32 DDWindow::DrawingThread(void *data)
|
|||||||
uint8 *srcbits, *destbits;
|
uint8 *srcbits, *destbits;
|
||||||
clipping_rect *clip;
|
clipping_rect *clip;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
int32 winleft=(int32)w->Frame().left,wintop=(int32)w->Frame().top;
|
|
||||||
|
|
||||||
DTRACE(("\tClipping rectangles to copy: %lu\n",w->fNumClipRects));
|
DTRACE(("\tClipping rectangles to copy: %lu\n",w->fNumClipRects));
|
||||||
for(i=0; i<w->fNumClipRects; i++)
|
for(i=0; i<w->fNumClipRects; i++)
|
||||||
@@ -1209,8 +1226,8 @@ int32 DDWindow::DrawingThread(void *data)
|
|||||||
bytes_to_copy=((rect.right-rect.left)+1)<<2;
|
bytes_to_copy=((rect.right-rect.left)+1)<<2;
|
||||||
height=(rect.bottom-rect.top)+1;
|
height=(rect.bottom-rect.top)+1;
|
||||||
|
|
||||||
destbits=w->fBits+ ( (rect.top+(int32)w->Frame().top)*w->fRowBytes)+
|
destbits=w->fBits+ ( (rect.top+wintop)*w->fRowBytes)+
|
||||||
( (rect.left+(int32)w->Frame().left)<<2);
|
( (rect.left+winleft)<<2);
|
||||||
|
|
||||||
srcbits=(uint8*)w->framebuffer->Bits()+
|
srcbits=(uint8*)w->framebuffer->Bits()+
|
||||||
(rect.top*w->framebuffer->BytesPerRow())+
|
(rect.top*w->framebuffer->BytesPerRow())+
|
||||||
@@ -1275,6 +1292,7 @@ int32 DDWindow::DrawingThread(void *data)
|
|||||||
debugger("DirectDriver was given an unsupported color mode.");
|
debugger("DirectDriver was given an unsupported color mode.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
w->fDrawThreadID=-1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user