Basic FreeType renderer implementation.
[gdipp.git] / gdipp_server / dc_pool.h
blob657184ebd25f71c9a4194811c59b0a9a9a097a1e
1 #pragma once
3 namespace gdipp
6 class dc_pool
8 // pool for managing costly and reusable HDCs
9 // all operations are thread-safe
11 public:
12 ~dc_pool();
13 HDC claim();
14 bool free(HDC hdc);
16 private:
17 // free HDCs are ready to be claimed
18 // busy HDCs are claimed and being used
19 std::list<HDC> _free;
20 std::set<HDC> _busy;