My last commit broke setting fonts in BPictures. Added a comment in

PicturePlayer to explain what we need to do. Don't write the 
B_PIC_ENTER_STATE_CHANGE and B_PIC_ENTER_FONT_STATE ops until we fix the 
problem (we don't care about them in our server side 
implementation anyway). Font changes and state syncing work again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-08-14 08:40:13 +00:00
parent c00e6e3f89
commit 2f99607b77
2 changed files with 10 additions and 4 deletions
+6
View File
@@ -512,6 +512,12 @@ PicturePlayer::Play(void **callBackTable, int32 tableEntries, void *userData)
break; break;
} }
// TODO: This is not correct. B_PIC_ENTER_STATE_CHANGE and
// B_PIC_ENTER_FONT_STATE ops include other ops. We should just advance
// the buffer by the size of these ops, not the size of the whole block,
// otherwise the nested ops won't be executed. I disabled them in
// ServerPicture::SyncState() and ServerPicture::SetFontFromLink()
// until we handle them correctly here.
pos += size; pos += size;
data += size; data += size;
+4 -4
View File
@@ -802,7 +802,7 @@ void
ServerPicture::SyncState(ViewLayer *view) ServerPicture::SyncState(ViewLayer *view)
{ {
// TODO: Finish this // TODO: Finish this
BeginOp(B_PIC_ENTER_STATE_CHANGE); //BeginOp(B_PIC_ENTER_STATE_CHANGE);
WriteSetOrigin(view->CurrentState()->Origin()); WriteSetOrigin(view->CurrentState()->Origin());
WriteSetPenLocation(view->CurrentState()->PenLocation()); WriteSetPenLocation(view->CurrentState()->PenLocation());
@@ -816,14 +816,14 @@ ServerPicture::SyncState(ViewLayer *view)
WriteSetHighColor(view->CurrentState()->HighColor().GetColor32()); WriteSetHighColor(view->CurrentState()->HighColor().GetColor32());
WriteSetLowColor(view->CurrentState()->LowColor().GetColor32()); WriteSetLowColor(view->CurrentState()->LowColor().GetColor32());
EndOp(); //EndOp();
} }
void void
ServerPicture::SetFontFromLink(BPrivate::LinkReceiver& link) ServerPicture::SetFontFromLink(BPrivate::LinkReceiver& link)
{ {
BeginOp(B_PIC_ENTER_STATE_CHANGE); //BeginOp(B_PIC_ENTER_STATE_CHANGE);
uint16 mask; uint16 mask;
link.Read<uint16>(&mask); link.Read<uint16>(&mask);
@@ -887,7 +887,7 @@ ServerPicture::SetFontFromLink(BPrivate::LinkReceiver& link)
WriteSetFontFlags(flags); WriteSetFontFlags(flags);
} }
EndOp(); //EndOp();
} }