ServerWindow needs only to call DirectWindowData::SetState() now, since it does all the work to sync with the client itself. Made DirectWindowData::SynchronizeWithClient() private and renamed it accordingly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32644 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ec2f22d0d7
commit
899d145454
@ -76,7 +76,7 @@ DirectWindowData::GetSyncData(direct_window_sync_data& data) const
|
||||
|
||||
|
||||
status_t
|
||||
DirectWindowData::SyncronizeWithClient()
|
||||
DirectWindowData::_SyncronizeWithClient()
|
||||
{
|
||||
// Releasing this semaphore causes the client to call
|
||||
// BDirectWindow::DirectConnected()
|
||||
@ -94,7 +94,7 @@ DirectWindowData::SyncronizeWithClient()
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
status_t
|
||||
DirectWindowData::SetState(const direct_buffer_state& bufferState,
|
||||
const direct_driver_state& driverState, RenderingBuffer *buffer,
|
||||
const BRect& windowFrame, const BRegion& clipRegion)
|
||||
@ -108,8 +108,10 @@ DirectWindowData::SetState(const direct_buffer_state& bufferState,
|
||||
|
||||
bool isStopped = fTransition <= 0;
|
||||
|
||||
if (wasStopped && isStopped)
|
||||
return false;
|
||||
if (wasStopped && isStopped) {
|
||||
// Nothing to change
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
buffer_info->buffer_state = bufferState;
|
||||
|
||||
@ -167,5 +169,5 @@ DirectWindowData::SetState(const direct_buffer_state& bufferState,
|
||||
buffer_info->clip_list[i] = clipRegion.RectAtInt(i);
|
||||
}
|
||||
|
||||
return true;
|
||||
return _SyncronizeWithClient();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
direct_window_sync_data& data) const;
|
||||
status_t SyncronizeWithClient();
|
||||
|
||||
bool SetState(const direct_buffer_state& bufferState,
|
||||
status_t SetState(const direct_buffer_state& bufferState,
|
||||
const direct_driver_state& driverState,
|
||||
RenderingBuffer *renderingBuffer,
|
||||
const BRect& windowFrame,
|
||||
@ -54,8 +54,7 @@ public:
|
||||
bool full_screen;
|
||||
|
||||
private:
|
||||
bool _HandleStop(const direct_buffer_state& state);
|
||||
bool _HandleStart(const direct_buffer_state& state);
|
||||
status_t _SyncronizeWithClient();
|
||||
|
||||
sem_id fSem;
|
||||
sem_id fAcknowledgeSem;
|
||||
|
@ -3484,16 +3484,12 @@ ServerWindow::HandleDirectConnection(int32 bufferState, int32 driverState)
|
||||
return;
|
||||
|
||||
if (fDesktop->LockSingleWindow()) {
|
||||
if (!fDirectWindowData->SetState((direct_buffer_state)bufferState,
|
||||
(direct_driver_state)driverState,
|
||||
fDesktop->HWInterface()->FrontBuffer(), fWindow->Frame(),
|
||||
fWindow->VisibleContentRegion())) {
|
||||
fDesktop->UnlockSingleWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
status_t status = fDirectWindowData->SyncronizeWithClient();
|
||||
|
||||
status_t status = fDirectWindowData->SetState(
|
||||
(direct_buffer_state)bufferState,
|
||||
(direct_driver_state)driverState,
|
||||
fDesktop->HWInterface()->FrontBuffer(), fWindow->Frame(),
|
||||
fWindow->VisibleContentRegion());
|
||||
|
||||
if (status != B_OK) {
|
||||
char errorString[256];
|
||||
snprintf(errorString, sizeof(errorString),
|
||||
|
Loading…
x
Reference in New Issue
Block a user