diff --git a/src/image.cpp b/src/image.cpp index 31673b6b5f3..1acbd59c839 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -41,7 +41,6 @@ #include #include -#include #include static lg::log_domain log_display("display"); @@ -106,30 +105,23 @@ class cache_type public: cache_type() : content_() - , cache_lock_() { } cache_item& get_element(int index) { - std::lock_guard lock(cache_lock_); - - if(static_cast(index) >= content_.size()) { + if(static_cast(index) >= content_.size()) content_.resize(index + 1); - } - return content_[index]; } void flush() { - std::lock_guard lock(cache_lock_); content_.clear(); } private: std::vector> content_; - std::mutex cache_lock_; }; template