Thanks to latest changes, BDirectWindow now draws something. Though, looks like either the clipping region is wrong, or the app_server overwrites what the BDirectWindow app writes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14610 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -272,11 +272,8 @@ ServerWindow::Show()
|
|||||||
rootLayer->Unlock();
|
rootLayer->Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This doesn't work: Here we aren't shown yet as RootLayer::ShowWinBorder()
|
|
||||||
// does its work asynchronously. As we lock the rootlayer, I think it could be synchronous.
|
|
||||||
// Otherwise, we need a "Shown()" hook or something like that.
|
|
||||||
if (fDirectWindowData != NULL)
|
if (fDirectWindowData != NULL)
|
||||||
_HandleDirectConnection(B_DIRECT_START);
|
_HandleDirectConnection(B_DIRECT_START|B_BUFFER_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2410,14 +2407,18 @@ ServerWindow::_EnableDirectWindowMode()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ServerWindow::_HandleDirectConnection(direct_buffer_state state)
|
ServerWindow::_HandleDirectConnection(int bufferState, int driverState)
|
||||||
{
|
{
|
||||||
if (fDirectWindowData == NULL)
|
if (fDirectWindowData == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fDirectWindowData->direct_info->buffer_state = state;
|
if (bufferState != -1)
|
||||||
|
fDirectWindowData->direct_info->buffer_state = (direct_buffer_state)bufferState;
|
||||||
|
|
||||||
if ((state & B_DIRECT_MODE_MASK) != B_DIRECT_STOP) {
|
if (driverState != -1)
|
||||||
|
fDirectWindowData->direct_info->driver_state = (direct_driver_state)driverState;
|
||||||
|
|
||||||
|
if ((bufferState & B_DIRECT_MODE_MASK) != B_DIRECT_STOP) {
|
||||||
// TODO: Locking ?
|
// TODO: Locking ?
|
||||||
RenderingBuffer *buffer = fDesktop->GetHWInterface()->FrontBuffer();
|
RenderingBuffer *buffer = fDesktop->GetHWInterface()->FrontBuffer();
|
||||||
fDirectWindowData->direct_info->bits = buffer->Bits();
|
fDirectWindowData->direct_info->bits = buffer->Bits();
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
#define _SERVERWIN_H_
|
#define _SERVERWIN_H_
|
||||||
|
|
||||||
|
|
||||||
#include <DirectWindow.h> // for direct_buffer_state
|
|
||||||
#include <GraphicsDefs.h>
|
#include <GraphicsDefs.h>
|
||||||
#include <PortLink.h>
|
#include <PortLink.h>
|
||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
@@ -119,7 +118,7 @@ private:
|
|||||||
virtual void _GetLooperName(char* name, size_t size);
|
virtual void _GetLooperName(char* name, size_t size);
|
||||||
|
|
||||||
status_t _EnableDirectWindowMode();
|
status_t _EnableDirectWindowMode();
|
||||||
void _HandleDirectConnection(direct_buffer_state state);
|
void _HandleDirectConnection(int bufferState = -1, int driverState = -1);
|
||||||
|
|
||||||
// TODO: Move me elsewhere
|
// TODO: Move me elsewhere
|
||||||
status_t PictureToRegion(ServerPicture *picture,
|
status_t PictureToRegion(ServerPicture *picture,
|
||||||
|
|||||||
Reference in New Issue
Block a user