From 1876ba00cdaf6a9c0ffc568812bb07e8341ec44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 2 Jan 2019 18:31:04 +0100 Subject: [PATCH] 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 --- src/servers/app/DrawState.cpp | 6 ++++-- src/servers/app/DrawState.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/servers/app/DrawState.cpp b/src/servers/app/DrawState.cpp index b10cda187b..f9486a2112 100644 --- a/src/servers/app/DrawState.cpp +++ b/src/servers/app/DrawState.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2015, Haiku. + * Copyright 2001-2018, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -153,7 +153,7 @@ DrawState::PopState() } -void +uint16 DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link) { uint16 mask; @@ -213,6 +213,8 @@ DrawState::ReadFontFromLink(BPrivate::LinkReceiver& link) link.Read(&flags); fFont.SetFlags(flags); } + + return mask; } diff --git a/src/servers/app/DrawState.h b/src/servers/app/DrawState.h index 8e664b8e8a..1487944f19 100644 --- a/src/servers/app/DrawState.h +++ b/src/servers/app/DrawState.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2015, Haiku. + * Copyright 2001-2018, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -46,7 +46,7 @@ public: DrawState* PopState(); DrawState* PreviousState() const { return fPreviousState; } - void ReadFontFromLink(BPrivate::LinkReceiver& link); + uint16 ReadFontFromLink(BPrivate::LinkReceiver& link); // NOTE: ReadFromLink() does not read Font state!! // It was separate in ServerWindow, and I didn't // want to change it without knowing implications.