Made copying into overlay save, by locking the bits.
This could be further optimized, by always hloding the lock, and only unlocking when app-server requests it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17481 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
94e881ade0
commit
46daa6672e
@ -299,7 +299,14 @@ VideoNode::HandleBuffer(BBuffer *buffer)
|
||||
LockBitmap();
|
||||
if (fBitmap) {
|
||||
// bigtime_t start = system_time();
|
||||
memcpy(fBitmap->Bits(), buffer->Data(), fBitmap->BitsLength());
|
||||
if (fOverlayActive) {
|
||||
if (B_OK == fBitmap->LockBits()) {
|
||||
memcpy(fBitmap->Bits(), buffer->Data(), fBitmap->BitsLength());
|
||||
fBitmap->UnlockBits();
|
||||
}
|
||||
} else {
|
||||
memcpy(fBitmap->Bits(), buffer->Data(), fBitmap->BitsLength());
|
||||
}
|
||||
// printf("overlay copy: %Ld usec\n", system_time() - start);
|
||||
}
|
||||
UnlockBitmap();
|
||||
|
Loading…
Reference in New Issue
Block a user