CrossApp alpha V0.1.4 updated: performance improved significantly

Source: Internet
Author: User

1. Power Consumption Optimization

Because CrossApp extracted cocos2d-x rendering driver mode, the program life cycle, in the continuous re-painting, the disadvantage of the rendering driver mode is that the CPU usage is high, so the power consumption. Obviously, this continuous re-painting method may have little impact on the game, but it is too wasteful for the APP. Therefore, we change the rendering mechanism to the event-driven mode based on the features of the application. This mode of rendering will be re-painted only when it is triggered by the outside world. When there is no outside triggering, the screen is still and the rendering is stopped to save energy.

2. Modify CAButton

Add a new attribute AllowsSelected including set and get. The default value is false. If this parameter is set to true, the selected mode is enabled. In this mode. The button is switched between the selected status and the default status. That is, if the current status is default, press the button and raise it, the button switches to the selected status, and then press and lift again, the button switches back to the normal status. At the same time, we can use the getSelected) method to promptly obtain which of the two States the current button belongs.

3. CASchedule is modified by the original CCSchedule)

A. Simplified usage: you only need to call the corresponding static method to start, stop, and other operations.

B. Memory Management modification: the timer is started before, and the reference count for pTarget is increased by 1 to prevent program crash due to release of pTarget. Now, a new mechanism is enabled to completely avoid the above problems. Therefore, after the timer is started, the reference count for pTarget is no longer greater than 1, and the related timer is automatically stopped after the pTarget is released.

C. New Feature: When pTarget is of the CAViewController or its derived type and the view of the CAViewController is not displayed, the timer is automatically paused. When the view is displayed again, the timer is automatically restored. In addition, there will be no changes before pTarget is released.

4. Demo location change

Demo has the original projects folder moved to samples.

About CrossApp

CrossApp is a free, open-source, cross-platform App development engine. It is developed using C ++ Based on the MIT open-source protocol and rendered based on OpenGL ES 2.0, it can help all developers quickly develop cross-platform native apps. Currently, it mainly supports exporting IOS and Android apps.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.