From 2867ac7a1cdf99ee92eb774dc3530c2987257d63 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 7 Feb 2019 22:16:32 +0000 Subject: [PATCH] Remove unused screenshot code Signed-off-by: Yuxuan Shui --- src/compton.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/compton.c b/src/compton.c index b75689f..6be7330 100644 --- a/src/compton.c +++ b/src/compton.c @@ -3210,37 +3210,6 @@ session_destroy(session_t *ps) { log_deinit_tls(); } -#if 0 -/** - * @brief Dump the given data to a file. - */ -static inline bool -write_binary_data(const char *path, const unsigned char *data, int length) { - if (!data) - return false; - FILE *f = fopen(path, "wb"); - if (!f) { - log_error("Failed to open \"%s\" for writing.", path); - return false; - } - int wrote_len = fwrite(data, sizeof(unsigned char), length, f); - fclose(f); - if (wrote_len != length) { - log_error("Failed to write all blocks: %d / %d to %s", - wrote_len, length, path); - return false; - } - return true; -} -static inline void -dump_img(session_t *ps) { - int len = 0; - unsigned char *d = glx_take_screenshot(ps, &len); - write_binary_data("/tmp/dump.raw", d, len); - free(d); -} -#endif - /** * Do the actual work. *