Forums » C++ Framework » Masking (CCMask) really slow »
| Max Clarke | Masking (CCMask) really slow | ||
|---|---|---|---|
|
Added by Max Clarke about 1 year ago
Hi, I'm porting an app to cocos2d-x and I'm using the CCMask class to create a circular view hole. It works fine on iOS but on Android it's really slow. The code originated here: http://www.cocos2d-iphone.org/forum/topic/15890/page/2#post-109368 I've attached the 2d-x version to this message. mask() is called every update tick using CCScheduler. Anyone know why this is so slow? It drops the framerate down to about 4-5 fps on my HTC Sensation. Thanks CCMask.h (1 kB) |
||
| Max Clarke | RE: Masking (CCMask) really slow | ||
|
Added by Max Clarke about 1 year ago
And here's the .cpp CCMask.cpp (3 kB) |
||
| Toma To | RE: Masking (CCMask) really slow | ||
|
Same problem here, but haven't found any solution yet. |
||
| Minggo Zhang | RE: Masking (CCMask) really slow | ||
|
Added by Minggo Zhang 11 months ago
Have you tried the latest codes? |
||
| Toma To | RE: Masking (CCMask) really slow | ||
|
You mean v2.0 branch ? |
||
| Toma To | RE: Masking (CCMask) really slow | ||
|
Got it, this patch http://cocos2d-x.org/projects/native/repository/revisions/0fc4196c788ac0fbb5c3deec9d9c4772db73f4c0 works perfectly, now masking run very smoothly. Great job ! |
(1-5/5)