1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

LibGfx+IPCCompiler: Add IPC encoders for Color and ShareableBitmap

This commit is contained in:
Andreas Kling 2020-05-12 18:52:51 +02:00
parent f8e3c8326d
commit fbda28248a
5 changed files with 19 additions and 7 deletions

View file

@ -32,6 +32,7 @@
#include <LibGfx/Color.h>
#include <LibGfx/SystemTheme.h>
#include <LibIPC/Decoder.h>
#include <LibIPC/Encoder.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@ -433,6 +434,12 @@ const LogStream& operator<<(const LogStream& stream, Color value)
return stream << value.to_string();
}
bool IPC::encode(IPC::Encoder& encoder, const Color& color)
{
encoder << color.value();
return true;
}
bool IPC::decode(IPC::Decoder& decoder, Color& color)
{
u32 rgba = 0;