Diving further into the code I found that you chose to use structs of vectors for the layoutContainer and the viewContainer.
I find this design a bit unfortunate since in practice you will almost never iterate over single vector elements. I think a better choice would be to use a vector of structs (layoutItems / viewItems) instead.
This has some advantages:
- smaller number of pointers to dereferences.
- much bigger chance to have data that is used together in the same cache line (64 byte on current CPUs). This is potentially a great performace booster.
- Code is (IMO) easier to understand and to maintain. (check IPlugGUIResize::AttachGUIResize)
I have refactored the files IPlugGUIResize.h and IPlugGUIResize.cpp accordingly. If you like my changes feel free to pull them into your repository.
Have you considered using vcpkg to include the cairo libraries and further dependencies? This is by far the easiest and most powerful way to do it that I have seen for the windows platform. vcpkg is a package manager created by microsoft. It is designed to give you a user experience similar to the best packet managers on the linux and osx platforms (like apt and homebrew)
Setting it up is a breeze and usage is very straightforward.
Here is a link: https://github.com/Microsoft/vcpkg
and an introduction video (straight from the nerd zone) https://channel9.msdn.com/Shows/C9-G...ction-To-Vcpkg