Merge pull request #1143 from hwhw/master

Fix cache implementation, pull blitbuffer fix
fix memory calculation for cache insert decision, simplify drawing/rendering