Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Need to prove: in the embodiment of the present invention, related terminal includes but not limited to mobile phone, personal digital assistant (Personal Digital Assistant is called for short PDA), radio hand-held equipment, wireless Internet access basis, portable computer, MP3 player, MP4 player etc.
The schematic flow sheet of the method to set up of the system color depth that Fig. 1 provides for the embodiment of the present invention one, as shown in Figure 1, the method to set up of the system color depth of the present embodiment can comprise the following steps:
Step 101, according to the application type of the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program;
In this step, can according to the application type of different application programs, obtain corresponding color depth parameter.
Step 102, utilize above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set.
In this step, can utilize the color depth parameter of obtaining by step 101, the system color depth of terminal is set.
In the present embodiment, by the application type according to the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, thereby make it possible to utilize above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set, can make the setting of system color depth of terminal more flexible, more be adapted to dissimilar application program.
For the method that makes the embodiment of the present invention provide is clearer, the below will be with the application program of the application program of 3D type and non-3D type as an example.The schematic flow sheet of the method to set up of the system color depth that Fig. 2 provides for the embodiment of the present invention two, as shown in Figure 2, the method to set up of the system color depth of the present embodiment can comprise the following steps:
Step 201, according to the application type of the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, the application type of above-mentioned application program can comprise 3D type and non-3D type;
In this step, the application type of application program that specifically can the current operation of sense terminals:
When the application type that detects above-mentioned application program is the 3D type, obtain the first color depth parameter corresponding with above-mentioned 3D type, particularly: when application program having been detected and carry out computing by the 3D application programming interfaces, the application type that the application program of the current operation of terminal is described is the 3D type, obtains the first color depth parameter corresponding with above-mentioned 3D type;
When the application type that detects above-mentioned application program is non-3D type, obtain the second color depth parameter corresponding with above-mentioned non-3D type, particularly: when the 3D application programming interfaces being detected and be closed condition, the application type that the application program of the current operation of terminal is described is non-3D type, obtains the second color depth parameter corresponding with above-mentioned non-3D type; Wherein, the bit number that the bit number that above-mentioned the first color depth parameter identifies identifies less than above-mentioned the second color depth parameter, for example: the first color depth parameter can be 16 bits (bit), and the second color depth parameter can be 24 bits (bit).
Wherein, 3D application programming interfaces (Application Programming Interface is called for short API) can include but not limited to DirectX, OpenGL, Glide and Heidi.
Step 202, utilize above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set.
In this step, can utilize the color depth parameter of obtaining by step 201, the system color depth of terminal is set.
For the method that makes the embodiment of the present invention provide is clearer, the below will be with the Android mobile phone as an example.In this step, can increase a Hook Function in the OpenG L in the Android mobile phone, onCreate function in this OpenGL of any application call or onResume function are arranged when carrying out computing by OpenG L, the application type that the application program of the current operation of terminal is described is the 3D type, can trigger above-mentioned Hook Function, to obtain the first color depth parameter corresponding with above-mentioned 3D type, for example: 16 bits (bit); Subsequently, onPause function in this application call OpenG L is when closing OpenGL, the application type that the application program of the current operation of terminal is described is non-3D type, obtain the second color depth parameter corresponding with above-mentioned non-3D type, can trigger above-mentioned Hook Function, to obtain the second color depth parameter corresponding with above-mentioned non-3D type, for example: 24 bits (bit).Further, can drive by revising FrameBuffer, interface with the system color depth that increases switching terminal, triggering according to Hook Function in OpenG L, the first color depth parameter or the second color depth parameter obtained are set to the system color depth of terminal, thereby can realize the dynamic adjustment of system color depth.
In the present embodiment, by the application type (3D type or non-3D type) according to the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, thereby make it possible to utilize above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set, make application program when operation of 3D type, the bit of color depth is less, can guarantee the normal operation of the application program of image display effect and 3D type preferably.The method to set up of the system color depth that employing the present embodiment provides, can make the setting of system color depth of terminal more flexible, more be adapted to dissimilar application program, need not to improve the hardware handles ability of terminal, thereby avoided the cost of terminal to increase.
Need to prove: for aforesaid each embodiment of the method, for simple description, therefore it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, there is no the part that describes in detail in certain embodiment, can be referring to the associated description of other embodiment.
A structural representation of the terminal that Fig. 3 provides for the embodiment of the present invention three, as shown in Figure 3, the terminal of the present embodiment can comprise acquisition module 31 and module 32 is set.Wherein, the application type that acquisition module 31 is used for according to the application program of the current operation of above-mentioned terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, module 32 is set is used for utilizing above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set.
In the invention described above embodiment one, the function of method can be realized by the terminal that the embodiment of the present invention provides.
In the present embodiment, by the application type of acquisition module according to the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, thereby make and module is set utilizes above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set, can make the setting of system color depth of terminal more flexible, more be adapted to dissimilar application program.The terminal that adopts the present embodiment to provide need not to improve the hardware handles ability of terminal, thereby has avoided the cost of terminal to increase.
Wherein, the application type of above-mentioned application program can comprise 3D type and non-3D type.As shown in Figure 4, the acquisition module 31 in the terminal that provides of the present embodiment may further include detecting unit 41, the first acquiring unit 42 and second acquisition unit 43.Wherein, detecting unit 41 is for detection of the application type of the application program of the current operation of above-mentioned terminal, when the first acquiring unit 42 is the 3D type for the application type that detects above-mentioned application program when detecting unit 41, obtain the first color depth parameter corresponding with above-mentioned 3D type, when second acquisition unit 43 is non-3D type for the application type that detects above-mentioned application program when detecting unit 41, obtain the second color depth parameter corresponding with above-mentioned non-3D type; Wherein, the bit number that identifies less than above-mentioned the second color depth parameter of the bit number that identifies of above-mentioned the first color depth parameter.
Particularly, the first acquiring unit 42 specifically can be used for when detecting unit 41 has detected application program and carries out computing by the 3D application programming interfaces, the application type that the application program of the current operation of above-mentioned terminal is described is the 3D type, obtains the first color depth parameter corresponding with above-mentioned 3D type.
Particularly, second acquisition unit 43 specifically can be used for when detecting unit 41 detects the 3D application programming interfaces and is closed condition, the application type that the application program of the current operation of above-mentioned terminal is described is non-3D type, obtains the second color depth parameter corresponding with above-mentioned non-3D type.
In the present embodiment, by the application type of acquisition module according to the application program of the current operation of terminal, obtain the color depth parameter corresponding with the application type of above-mentioned application program, thereby make and module is set utilizes above-mentioned color depth parameter, the system color depth of above-mentioned terminal is set, make application program when operation of 3D type, the bit of color depth is less, can guarantee the normal operation of the application program of image display effect and 3D type preferably.The method to set up of the system color depth that employing the present embodiment provides, can make the setting of system color depth of terminal more flexible, more be adapted to dissimilar application program, need not to improve the hardware handles ability of terminal, thereby avoided the cost of terminal to increase.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be completed by the hardware that programmed instruction is correlated with, aforesaid program can be stored in a computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.