fredsa / playn

Cross platform game library for N≥4 platforms
0 stars 1 forks source link

Improve Android CanvasLayer behavior #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of code changes on this branch:
Previously, Android waited for the CanvasImage to be finalized before releasing 
its underlying texture. This is not a viable approach to texture management.

In the case of CanvasLayer, the underlying CanvasImage is completely private, 
so when the layer is destroyed, we can safely release the image resources. This 
patch does so.

Better texture management is going to be needed for ImageLayer and arbitrary 
Images. Most likely a reference counting scheme will work effectively, but that 
will have to wait for a future patch.

When reviewing my code changes, please focus on:
https://github.com/threerings/playn/commit/cca2b71401881debd566e3a58e9626ca938e8
9ec

After the review, I'll merge this branch into:
/trunk

Original issue reported on code.google.com by samskiv...@gmail.com on 28 Sep 2011 at 6:53

GoogleCodeExporter commented 9 years ago
LGTM

Original comment by charlie....@gmail.com on 28 Sep 2011 at 8:41

GoogleCodeExporter commented 9 years ago
Committed as 1e4e6569e97d8a1b6be9f3a3a96a9f903ca3a1bd.

Original comment by samskiv...@gmail.com on 28 Sep 2011 at 9:20