summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx/Color.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-29 19:03:13 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-29 19:37:23 +0200
commit24a0354ce84c6c839930788bc772736f7c56ae18 (patch)
tree535fd6235b4858da2f5d918d079481582a0a0102 /Libraries/LibGfx/Color.cpp
parent01ff36a2f41e87d908f195c1cd517ff45d89e580 (diff)
downloadserenity-24a0354ce84c6c839930788bc772736f7c56ae18.zip
LibIPC+LibGfx: Pass the IPC::Decoder to decoding helpers
Instead of passing the BufferStream, pass the Decoder. I'd like to stop using BufferStream eventually anyway, so it's good to get it out of any API's where it's in currently.
Diffstat (limited to 'Libraries/LibGfx/Color.cpp')
-rw-r--r--Libraries/LibGfx/Color.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibGfx/Color.cpp b/Libraries/LibGfx/Color.cpp
index 851bc1d24b..01bb3988d4 100644
--- a/Libraries/LibGfx/Color.cpp
+++ b/Libraries/LibGfx/Color.cpp
@@ -31,6 +31,7 @@
#include <AK/Vector.h>
#include <LibGfx/Color.h>
#include <LibGfx/SystemTheme.h>
+#include <LibIPC/Decoder.h>
#include <ctype.h>
#include <stdio.h>
@@ -386,11 +387,10 @@ const LogStream& operator<<(const LogStream& stream, Color value)
return stream << value.to_string();
}
-bool IPC::decode(BufferStream& stream, Color& color)
+bool IPC::decode(IPC::Decoder& decoder, Color& color)
{
u32 rgba = 0;
- stream >> rgba;
- if (stream.handle_read_failure())
+ if (!decoder.decode(rgba))
return false;
color = Color::from_rgba(rgba);
return true;