aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightEncoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/TightEncoder.h')
-rw-r--r--common/rfb/TightEncoder.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/common/rfb/TightEncoder.h b/common/rfb/TightEncoder.h
index b96bc4c6..2be2f6d4 100644
--- a/common/rfb/TightEncoder.h
+++ b/common/rfb/TightEncoder.h
@@ -1,6 +1,6 @@
/* Copyright (C) 2000-2003 Constantin Kaplinsky. All Rights Reserved.
* Copyright (C) 2011 D. R. Commander
- * Copyright 2014 Pierre Ossman for Cendio AB
+ * Copyright 2014-2022 Pierre Ossman for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -54,22 +54,14 @@ namespace rfb {
void flushZlibOutStream(rdr::OutStream* os);
protected:
- // Preprocessor generated, optimised methods
+ // Templated, optimised methods
+ template<class T>
void writeMonoRect(int width, int height,
- const rdr::U8* buffer, int stride,
+ const T* buffer, int stride,
const PixelFormat& pf, const Palette& palette);
- void writeMonoRect(int width, int height,
- const rdr::U16* buffer, int stride,
- const PixelFormat& pf, const Palette& palette);
- void writeMonoRect(int width, int height,
- const rdr::U32* buffer, int stride,
- const PixelFormat& pf, const Palette& palette);
-
- void writeIndexedRect(int width, int height,
- const rdr::U16* buffer, int stride,
- const PixelFormat& pf, const Palette& palette);
+ template<class T>
void writeIndexedRect(int width, int height,
- const rdr::U32* buffer, int stride,
+ const T* buffer, int stride,
const PixelFormat& pf, const Palette& palette);
rdr::ZlibOutStream zlibStreams[4];