Merge "Rewrite thread logic, add tests and add color extraction for CanvasEngine" into tm-qpr-dev