Small cleanup. Use BitmapFlags() also in the other condition (don't
hardcode overlay color space). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28518 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -92,9 +92,12 @@ VideoView::SetBitmap(const BBitmap* bitmap)
|
||||
// we're going to deadlock when the window tells the node manager to
|
||||
// stop the nodes (Window -> NodeManager -> VideoConsumer -> VideoView
|
||||
// -> Window).
|
||||
if (bitmap && LockLooperWithTimeout(10000) == B_OK) {
|
||||
if (!bitmap || LockLooperWithTimeout(10000) != B_OK)
|
||||
return;
|
||||
|
||||
if (LockBitmap()) {
|
||||
if (fOverlayMode || (BitmapFlags(bitmap) & B_BITMAP_WILL_OVERLAY)) {
|
||||
if (fOverlayMode
|
||||
|| (BitmapFlags(bitmap) & B_BITMAP_WILL_OVERLAY) != 0) {
|
||||
if (!fOverlayMode) {
|
||||
// init overlay
|
||||
rgb_color key;
|
||||
@@ -131,7 +134,8 @@ VideoView::SetBitmap(const BBitmap* bitmap)
|
||||
| B_OVERLAY_FILTER_VERTICAL
|
||||
| B_OVERLAY_TRANSFER_CHANNEL);
|
||||
}
|
||||
} else if (fOverlayMode && bitmap->ColorSpace() != B_YCbCr422) {
|
||||
} else if (fOverlayMode
|
||||
&& (BitmapFlags(bitmap) & B_BITMAP_WILL_OVERLAY) == 0) {
|
||||
fOverlayMode = false;
|
||||
ClearViewOverlay();
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
@@ -143,7 +147,6 @@ VideoView::SetBitmap(const BBitmap* bitmap)
|
||||
}
|
||||
UnlockLooper();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user