title: Using arbitrary QML items as cached image source
body: <p>EDIT: The original question is still contained below, but I decided to re-title to a form that will be more useful to developers in a variety of cases, some of which described in my answer below, as the solution to the original problem turned out to provide a much wider area of application.</p>
  
  <hr>
  
  <p>I have a set of greyscale icons for an application, and a requirement that the icon color can be changed by the user.</p>
  
  <p>So, the obvious solution is to use the stock <code>Colorize</code> element from <code>QtGraphicalEffects</code>.</p>
  
  <p>The effect itself has a <code>cached</code> property - which caches the result of that particular effect so that it is not continuously calculated. However, this only applies to that particular instance of the effect, meaning if there are multiple icon instances, and every one has a colorize effect, this cache will not be shared between the different instances.</p>
  
  <p>Obviously, one single cache would be enough, considering that all icons are the same size and color, that data from VRAM can be reused, saving on VRAM and GPU time.</p>
  
  <p>So the big question is how to reuse that single cache of that single effect and display it multiple times without any overheads.</p>
  
  <p>Also, the previous question is regarding the current course I've taken with colorizing icons. However, there might be another approach I am missing.</p>
  
  <p>Naturally, efficiency is key, but simplicity is also desired, I mean I can think of several low level ways to do that very efficiently, but they all require more complex low level implementations, they are not possible to do in QML.</p>