axmol/tests/cpp-tests/Classes/TextureCacheTest
j-jorge 6bbf01537d Allow to unbind asynchronous texture loading callback with a custom key. (#17206)
* Allow to unbind asynchronous texture loading callback with a custom key.

In order to unbind the callback passed to
`cocos2d::TextureCache::addImageAsync(path, callback)`, one has to
call `cocos2d::TextureCache::unbindImageAsync(path)`. In the cases
where the loading of the same texture is requested from several sources
simultaneously, then none of the source can unbind its own callback
unambiguously.

This commit adds an overload of the `addImageAsync` function taking an extra
argument identifying the callback, thus allowing to unbind it unambiguously
in cases where the loading of path is requested by several sources
simultaneously.

* Add a test case for TextureCache::addImageAsync with a custom key.
2017-02-04 09:38:54 +08:00
..
TextureCacheTest.cpp Allow to unbind asynchronous texture loading callback with a custom key. (#17206) 2017-02-04 09:38:54 +08:00
TextureCacheTest.h Allow to unbind asynchronous texture loading callback with a custom key. (#17206) 2017-02-04 09:38:54 +08:00