diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-12 18:52:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-12 19:04:03 +0200 |
commit | fbda28248ab401867c9c55e0e03567b4226dac8d (patch) | |
tree | 85209c4281f5dce560cc3a24009bff7864ce4762 /Libraries/LibGfx/ShareableBitmap.cpp | |
parent | f8e3c8326de9c5a3de42542614575ab95357bff2 (diff) | |
download | serenity-fbda28248ab401867c9c55e0e03567b4226dac8d.zip |
LibGfx+IPCCompiler: Add IPC encoders for Color and ShareableBitmap
Diffstat (limited to 'Libraries/LibGfx/ShareableBitmap.cpp')
-rw-r--r-- | Libraries/LibGfx/ShareableBitmap.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Libraries/LibGfx/ShareableBitmap.cpp b/Libraries/LibGfx/ShareableBitmap.cpp index db73b59bc2..606c857cce 100644 --- a/Libraries/LibGfx/ShareableBitmap.cpp +++ b/Libraries/LibGfx/ShareableBitmap.cpp @@ -28,6 +28,7 @@ #include <LibGfx/Bitmap.h> #include <LibGfx/ShareableBitmap.h> #include <LibIPC/Decoder.h> +#include <LibIPC/Encoder.h> namespace Gfx { @@ -40,6 +41,14 @@ ShareableBitmap::ShareableBitmap(const Bitmap& bitmap) namespace IPC { +bool encode(Encoder& encoder, const Gfx::ShareableBitmap& shareable_bitmap) +{ + encoder << shareable_bitmap.shbuf_id(); + encoder << shareable_bitmap.width(); + encoder << shareable_bitmap.height(); + return true; +} + bool decode(Decoder& decoder, Gfx::ShareableBitmap& shareable_bitmap) { i32 shbuf_id = 0; |