style(clipboard): remove lib TODO comments

This commit is contained in:
Federico Terzi 2021-04-30 17:06:53 +02:00
parent f07ff326b5
commit 42ff9b5928
2 changed files with 1 additions and 5 deletions

View File

@ -157,7 +157,6 @@ public:
bool try_lock() {
bool res = m_lock.try_lock();
if (!res) {
// TODO make this configurable (the same for Windows retries)
for (int i=0; i<5 && !res; ++i) {
res = m_lock.try_lock();
std::this_thread::sleep_for(std::chrono::milliseconds(20));
@ -662,7 +661,6 @@ private:
xcb_get_property_reply_t* reply =
xcb_get_property_reply(m_connection, cookie, &err);
if (err) {
// TODO report error
free(err);
}
return reply;
@ -931,7 +929,6 @@ private:
std::make_shared<std::vector<uint8_t>>(
std::move(output));
}
// else { TODO report png conversion errors }
}
#endif
}

View File

@ -155,7 +155,6 @@ bool read_png(const uint8_t* buf,
spec.green_shift = 8;
spec.blue_shift = 16;
// TODO indexed images with alpha
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
spec.alpha_mask = 0xff000000;
@ -175,7 +174,7 @@ bool read_png(const uint8_t* buf,
image img(spec);
// We want RGB 24-bit or RGBA 32-bit as a result
png_set_strip_16(png); // Down to 8-bit (TODO we might support 16-bit values)
png_set_strip_16(png); // Down to 8-bit
png_set_packing(png); // Use one byte if color depth < 8-bit
png_set_expand_gray_1_2_4_to_8(png);
png_set_palette_to_rgb(png);