DrawState: Return mask from ReadFontFromLink()

When changing the font state, a uin16 mask at the beginning of the
commands encodes which font parameters are transmitted in the link
data. Return this mask, so that one can know what parameters have
changed in the DrawState's ServerFont.

Change-Id: I52a9a665aac8eb0e6505193eba32c4b137846c78
Reviewed-on: https://review.haiku-os.org/814
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Stephan Aßmus 2019-01-02 18:31:04 +01:00 committed by waddlesplash
parent ddb1ff5587
commit 1876ba00cd
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2015, Haiku. * Copyright 2001-2018, Haiku.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -153,7 +153,7 @@ DrawState::PopState()
} }
void uint16
DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link) DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link)
{ {
uint16 mask; uint16 mask;
@ -213,6 +213,8 @@ DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link)
link.Read<uint32>(&flags); link.Read<uint32>(&flags);
fFont.SetFlags(flags); fFont.SetFlags(flags);
} }
return mask;
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2015, Haiku. * Copyright 2001-2018, Haiku.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -46,7 +46,7 @@ public:
DrawState* PopState(); DrawState* PopState();
DrawState* PreviousState() const { return fPreviousState; } DrawState* PreviousState() const { return fPreviousState; }
void ReadFontFromLink(BPrivate::LinkReceiver& link); uint16 ReadFontFromLink(BPrivate::LinkReceiver& link);
// NOTE: ReadFromLink() does not read Font state!! // NOTE: ReadFromLink() does not read Font state!!
// It was separate in ServerWindow, and I didn't // It was separate in ServerWindow, and I didn't
// want to change it without knowing implications. // want to change it without knowing implications.