CN103577177A - Method and equipment for invoking graphics libraries - Google Patents

Method and equipment for invoking graphics libraries Download PDF

Info

Publication number
CN103577177A
CN103577177A CN201210273238.2A CN201210273238A CN103577177A CN 103577177 A CN103577177 A CN 103577177A CN 201210273238 A CN201210273238 A CN 201210273238A CN 103577177 A CN103577177 A CN 103577177A
Authority
CN
China
Prior art keywords
interface
shape library
difference
bank
correspondence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210273238.2A
Other languages
Chinese (zh)
Other versions
CN103577177B (en
Inventor
牛东升
张保华
孔利
曹民强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210273238.2A priority Critical patent/CN103577177B/en
Publication of CN103577177A publication Critical patent/CN103577177A/en
Application granted granted Critical
Publication of CN103577177B publication Critical patent/CN103577177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and equipment for invoking graphics libraries, and belongs to the field of mobile communication. The method includes acquiring invocation requests of users of the graphics libraries; acquiring graphics library version marks of mobile terminals when graphics library interfaces corresponding to graphics library interface marks are difference graphics library interfaces; invoking a graphics library difference processing layer corresponding to the graphics library version marks according to the graphics library version marks; enabling the graphics library difference processing layer to carry out difference processing on the difference graphics library interfaces; invoking the graphics libraries corresponding to the graphics library version marks via the difference graphics library interfaces after difference processing is carried out on the difference graphics library interfaces. The invocation requests include the graphics library interface marks. The equipment comprises a first acquisition module, a second acquisition module, a first invocation module, a difference processing module and a second invocation module. The method and the equipment have the advantages that problems due to difference in graphics library versions and the problem of large size of an application program package can be solved by the aid of the graphics library difference processing layer, memory resources can be saved, and different versions of graphics libraries are compatible with one another.

Description

A kind of shape library call method and equipment
Technical field
The present invention relates to field of mobile communication, particularly a kind of shape library call method and equipment.
Background technology
Along with popularizing of intelligent mobile terminal, the exploitation of the operating system of mobile terminal is more and more important.And in the performance history of operating system, need to often call shape library, and being all generally form with dynamic link, shape library is present in mobile terminal.When using shape library, developer need to use the form of dynamic link to call the shape library of mobile terminal.Different due to the operating system version of mobile terminal, such as Android system, there are the versions such as V1.0, V2.1, V2.2, the shape library external interface that the operating system of different editions provides is different, when this has just caused calling shape library, do compatible processing to the shape library interface of different editions.
Prior art when calling image library, the compatibility issue bringing for the difference in version of shape library, current solution is that shape library, the mode with static linkage is linked in (application program) developer.
In realizing process of the present invention, inventor finds that prior art at least exists following problem:
Owing to shape library being statically linked to own shape library, cause application package bulky, occupied a large amount of internal memories, take and be with SKIA shape library as example in Android system, it is with SKIA shape library to surpass 1 megabyte, and this is for the embedded device of current internal memory anxiety, and cost is too large.
Summary of the invention
In order effectively to solve problem and the bulky problem of application package that shape library difference in version is brought, the embodiment of the present invention provides a kind of shape library call method and equipment.Described technical scheme is as follows:
The embodiment of the present invention provides a kind of shape library call method, and described method comprises:
Obtain shape library user's call request, described call request comprises shape library interface identifier;
When described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtain the shape library version identifier of mobile terminal;
According to described shape library version identifier, call described shape library version identifier graph of a correspondence storehouse difference processing layer;
By described shape library difference processing layer, described difference figure bank interface is carried out to difference processing;
Difference figure bank interface after processing by difference calls described shape library version identifier graph of a correspondence storehouse.
Particularly, described when described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, before obtaining the shape library version identifier of mobile terminal, comprising:
According to described shape library interface identifier, judge whether described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
Further, described according to described shape library interface identifier, judge that whether described shape library interface identifier graph of a correspondence bank interface is after difference figure bank interface, also comprises:
When described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, call the public wrapper of shape library; Described common graphics bank interface is other all shape library interfaces except described difference figure bank interface;
By the public wrapper of described shape library, directly call described shape library interface identifier graph of a correspondence storehouse.
Wherein, described when described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, before calling the public wrapper of shape library, also comprise:
All common graphics bank interfaces of different editions are packaged into identical shape library interface, and are encapsulated in the public wrapper of described shape library.
Particularly, described according to described shape library version identifier, before calling described shape library version identifier graph of a correspondence storehouse difference processing layer, also comprise:
According to described shape library version identifier, described difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
Particularly, by described shape library difference processing layer, described difference figure bank interface is carried out to difference processing, includes but not limited to following mode:
The interface parameters number providing when described difference figure bank interface more than or while being less than the interface parameters number in described shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of described shape library;
Or,
When the interface function providing when described difference figure bank interface and the interface function in described shape library version identifier graph of a correspondence storehouse there are differences, the interface function described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library function;
Or,
When the interface name providing when described difference figure bank interface and the interface name in described shape library version identifier graph of a correspondence storehouse there are differences, the interface name described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library title;
Or,
When the data member in described shape library version identifier graph of a correspondence storehouse there are differences, by described shape library difference processing layer, described difference figure bank interface is configured to new interface, described new interface is obtained the value of described data member and is returned to described shape library user or obtain the value of preserving described data member after the value of described data member.
The embodiment of the present invention also provides a kind of shape library invocation facility, and described equipment comprises:
The first acquisition module, for obtaining shape library user's call request, described call request comprises shape library interface identifier;
The second acquisition module, for when described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtains the shape library version identifier of mobile terminal;
The first calling module, for according to described shape library version identifier, calls described shape library version identifier graph of a correspondence storehouse difference processing layer;
Difference processing module, for carrying out difference processing by described shape library difference processing layer to described difference figure bank interface;
The second calling module, calls described shape library version identifier graph of a correspondence storehouse for the difference figure bank interface after processing by difference.
Particularly, described equipment comprises:
Judge module, before obtaining the shape library version identifier of described mobile terminal at the second acquisition module, according to described shape library interface identifier, judges whether described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
Further, described equipment comprises:
The 3rd calling module, when judging that when described judge module described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, calls the public wrapper of shape library; Described common graphics bank interface is other all shape library interfaces except described difference figure bank interface;
The 4th calling module, for directly being called described shape library interface identifier graph of a correspondence storehouse by the public wrapper of described shape library.
Wherein, described the 3rd calling module, also for before calling the public wrapper of shape library, is packaged into identical shape library interface by all common graphics bank interfaces of different editions, and is encapsulated in the public wrapper of described shape library.
Particularly, described difference processing module comprises:
Division unit, for before described difference figure bank interface is carried out to difference processing, according to described shape library version identifier, described difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
Particularly, described difference processing module, includes but not limited to lower unit:
The first processing unit, for the interface parameters number that provides when described difference figure bank interface more than or while being less than the interface parameters number in described shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of described shape library;
The second processing unit, while there are differences for the interface function in the interface function that provides when described difference figure bank interface and described shape library version identifier graph of a correspondence storehouse, the interface function described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library function;
The 3rd processing unit, while there are differences for the interface name in the interface name that provides when described difference figure bank interface and described shape library version identifier graph of a correspondence storehouse, the interface name described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library title;
Fourth processing unit, for when the data member in described shape library version identifier graph of a correspondence storehouse there are differences, by described shape library difference processing layer, described difference figure bank interface is configured to new interface, described new interface is obtained the value of described data member and is returned to described shape library user or obtain the value of preserving described data member after the value of described data member.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
Shape library call method and equipment that the embodiment of the present invention provides, by introduce one deck shape library difference processing layer between shape library and shape library user, efficiently solve the problem that shape library difference in version is brought, and avoid the bulky problem of application package, save memory source, realized the compatibility of shape library different editions.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow diagram of a kind of shape library call method of providing of the embodiment of the present invention one;
Fig. 2 is the process flow diagram of a kind of shape library call method of providing of the embodiment of the present invention two;
Fig. 3 is the structural representation of a kind of shape library invocation facility of providing of the embodiment of the present invention three;
Fig. 4 is another structural representation of a kind of shape library invocation facility of providing of the embodiment of the present invention three;
Fig. 5 is the third structural representation of a kind of shape library invocation facility of providing of the embodiment of the present invention three.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
Fig. 1 is the process flow diagram that the embodiment of the present invention provides a kind of shape library call method, and referring to Fig. 1, this embodiment comprises:
101, obtain shape library user's call request, call request comprises shape library interface identifier;
102,, when shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtain the shape library version identifier of mobile terminal;
103,, according to shape library version identifier, call shape library version identifier graph of a correspondence storehouse difference processing layer;
104, by shape library difference processing layer, difference figure bank interface is carried out to difference processing;
105, the difference figure bank interface after processing by difference calls shape library version identifier graph of a correspondence storehouse.
Particularly, when shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, before obtaining the shape library version identifier of mobile terminal, comprising:
According to shape library interface identifier, judge whether shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
Further, according to shape library interface identifier, judge that whether shape library interface identifier graph of a correspondence bank interface is after difference figure bank interface, also comprises:
When shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, call the public wrapper of shape library; Common graphics bank interface is other all shape library interfaces except difference figure bank interface;
By the public wrapper of shape library, directly call figure bank interface sign graph of a correspondence storehouse.
Wherein, when shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, before calling the public wrapper of shape library, also comprise:
All common graphics bank interfaces of different editions are packaged into identical shape library interface, and are encapsulated in the public wrapper of shape library.
Particularly, according to shape library version identifier, before calling shape library version identifier graph of a correspondence storehouse difference processing layer, also comprise:
According to shape library version identifier, difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
Particularly, by described shape library difference processing layer, described difference figure bank interface is carried out to difference processing, includes but not limited to following mode:
The interface parameters number providing when difference shape library interface more than or while being less than the interface parameters number in shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of shape library;
Or,
When the interface function providing when difference shape library interface and the interface function in shape library version identifier graph of a correspondence storehouse there are differences, the interface function difference figure bank interface being provided is packaged into the uniform interface identical with shape library function;
Or,
When the interface name providing when difference shape library interface and the interface name in shape library version identifier graph of a correspondence storehouse there are differences, the interface name difference figure bank interface being provided is packaged into the uniform interface identical with shape library title;
Or,
When the data member in shape library version identifier graph of a correspondence storehouse there are differences, by shape library difference processing layer to difference figure bank interface configuration new interface, new interface obtain the value of data member and return to shape library user or obtain the value of data member after save data member's value.
The shape library call method that the embodiment of the present invention provides, by introduce one deck shape library difference processing layer between shape library and shape library user, efficiently solve the problem that shape library difference in version is brought, and avoid the bulky problem of application package, save memory source, realized the compatibility of shape library different editions.
Embodiment bis-
Fig. 2 is the process flow diagram that the embodiment of the present invention provides a kind of shape library call method.The executive agent of the embodiment of the present invention is embedded device, or develop software for the operating system of embedded device, this operating system develops software for mobile terminal, mobile terminal can be smart mobile phone, panel computer, PDA(Personal DigitalAssistant, personal digital assistant) etc.Referring to Fig. 2, this embodiment comprises:
201, all common graphics bank interfaces of different editions are packaged into identical shape library interface, and are encapsulated in the public wrapper of shape library, common graphics bank interface is other shape library interfaces except difference figure bank interface;
Particularly, first all common graphics bank interfaces of different editions are packaged into identical shape library interface, such as the shape library of the versions such as the V1.0 of Android system, V2.1, V2.2 is all packaged into identical API (Application Programming Interface, application programming interface) interface;
Secondly, the identical shape library interface encapsulation after packing, in the public wrapper of shape library, is existed with the form of dynamic link library, the public wrapper of shape library can directly call figure bank interface sign graph of a correspondence storehouse.
Shape library interface in the embodiment of the present invention comprises common graphics bank interface and difference figure bank interface, wherein, common graphics bank interface be can be general in the various shape libraries that have a different editions all shape library interfaces, and difference figure bank interface need to do for there are differences in the shape library of different editions the shape library interface that compatible processing could be general.
202, according to shape library version identifier, all differences shape library interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier;
Particularly, due to shape library version identifier (such as the shape library version identifier of Android system is respectively V1.0 version, V2.1 version, V2.2 version) difference, all differences shape library interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier;
Such as by all differences shape library interface of Android system according to V1.0, V2.1, V2.2 version, be divided into respectively V1.0 shape library difference processing layer, V2.1 shape library difference processing layer, V2.2 shape library difference processing layer; V1.0 shape library difference processing layer correspondence V1.0 version, and V2.1 shape library difference processing layer correspondence V2.1 version, and V2.2 shape library difference processing layer correspondence V2.2 version.
It should be noted that, the order of the step 201 in the embodiment of the present invention and step 202 can be exchanged, the i.e. sequencing of conditioning step 201 and step 202 not, can first perform step 201 rear execution steps 202, also can first perform step 202 rear execution steps 201, can certainly perform step 201 and step 202 simultaneously.
203, obtain shape library user's call request, call request comprises shape library interface identifier;
Particularly, when shape library user is generally developer and need to calls shape library, can send shape library call request; Obtain shape library user's call request, this call request comprises shape library interface identifier, the shape library interface identifier that wherein call request comprises can for one also can be for a plurality of.
204,, according to shape library interface identifier, judge whether shape library interface identifier graph of a correspondence bank interface is difference figure bank interface;
Particularly, according to shape library interface identifier, judge whether shape library interface identifier graph of a correspondence bank interface is difference figure bank interface;
If shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, perform step 205;
If when shape library interface identifier graph of a correspondence bank interface is not difference figure bank interface, call the public wrapper of shape library; The public wrapper of shape library directly calls figure bank interface sign graph of a correspondence storehouse for shape library user;
Further, when call request comprises a plurality of shape library interface identifier, according to shape library interface identifier, judge that whether shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, comprising:
According to each shape library interface identifier, judge respectively whether each shape library interface identifier graph of a correspondence bank interface is difference figure bank interface;
Correspondingly, variant shape library interface in shape library interface, continues execution step 205; If while having a plurality of difference figure bank interface in shape library interface, perform step respectively 205;
When shape library interface is not difference figure bank interface, calls the public wrapper of shape library, and directly call figure bank interface sign graph of a correspondence storehouse for shape library user by the public wrapper of shape library.
205,, when shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtain the shape library version identifier of mobile terminal;
Particularly, when shape library interface is difference figure bank interface, obtain the shape library version identifier of current mobile terminal, in Android system, the shape library version identifier that obtains current mobile terminal is V1.0 version.
206,, according to shape library version identifier, call shape library version identifier graph of a correspondence storehouse difference processing layer;
Particularly, get after shape library version identifier, call this shape library version identifier graph of a correspondence storehouse difference processing layer, and load this shape library difference processing layer, shape library difference processing layer is that the form with dynamic link library exists.
Such as the shape library version identifier of Android system is V2.1 version, call the V2.1 shape library difference processing layer that V2.1 version is corresponding.
207, by shape library difference processing layer, difference figure bank interface is carried out to difference processing;
Particularly, shape library difference processing layer carries out difference processing to difference figure bank interface, comprising:
The interface parameters providing when difference shape library interface during more than the interface parameters in shape library version identifier graph of a correspondence storehouse, discards a useless interface parameters to adapt to the interface parameters of shape library; Such as the interface parameters providing when difference shape library interface is 4, and the interface parameters of shape library is 3, can discard 1 useless interface parameters, to adapt to the interface parameters requirement of shape library, thereby guarantees normal call shape library.When the interface parameters providing when difference shape library interface is less than the interface parameters in shape library version identifier graph of a correspondence storehouse, configure a corresponding parameter to adapt to the interface parameters of shape library.Such as the interface parameters providing when difference shape library interface is 4, and the interface parameters of shape library is 5, need to configure again or obtain 1 interface parameters according to the interface parameters of shape library, to adapt to the interface parameters requirement of shape library, thereby guarantee normal call shape library.
When the interface function providing when difference shape library interface and the interface function in shape library version identifier graph of a correspondence storehouse there are differences, the interface function difference figure bank interface being provided is packaged into the uniform interface identical with shape library function;
When the interface name providing when difference shape library interface and the interface name in shape library version identifier graph of a correspondence storehouse there are differences, the interface name difference figure bank interface being provided is packaged into the uniform interface identical with shape library title;
When the data member in shape library version identifier graph of a correspondence storehouse there are differences, by shape library difference processing layer to difference figure bank interface configuration new interface, new interface obtain the value of data member and return to shape library user or obtain the value of data member after save data member's value.
208, the difference figure bank interface after processing by difference calls shape library version identifier graph of a correspondence storehouse.
Particularly, by shape library difference processing layer, difference figure bank interface is carried out after difference processing, at this moment the interface parameters of difference figure bank interface is identical with the interface parameters of called shape library, can call shape library.
Pay particular attention to, the method that the embodiment of the present invention provides is shape library call method, applicable equally for other dynamic link libraries of other embedded devices; The shape library Interface realization of the shape library call method that the embodiment of the present invention provides can adopt C language interface form in form, also can adopt C Plus Plus interface shape, can certainly adopt other interface shapes, and this embodiment of the present invention is not limited.
The shape library call method that the embodiment of the present invention provides, by introduce one deck shape library difference processing layer between shape library and shape library user, efficiently solve the problem that shape library difference in version is brought, and avoid the bulky problem of application package, save memory source, realized the compatibility of shape library different editions.
Embodiment tri-
Fig. 3 is that the embodiment of the present invention provides a kind of shape library invocation facility, and the executive agent of the embodiment of the present invention is embedded graphic library call equipment, and for the operating system exploitation to mobile terminal, referring to Fig. 3, this equipment comprises:
The first acquisition module 301, for obtaining shape library user's call request, call request comprises shape library interface identifier;
The second acquisition module 302, for when shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtains the shape library version identifier of mobile terminal;
The first calling module 303, for according to shape library version identifier, calls shape library version identifier graph of a correspondence storehouse difference processing layer;
Difference processing module 304, for carrying out difference processing by shape library difference processing layer to difference figure bank interface;
The second calling module 305, calls shape library version identifier graph of a correspondence storehouse for the difference figure bank interface after processing by difference.
Particularly, referring to Fig. 4, this equipment comprises:
Judge module 306, before obtaining the shape library version identifier of mobile terminal at the second acquisition module 302, according to shape library interface identifier, judges whether shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
Further, referring to Fig. 5, this equipment comprises:
The 3rd calling module 307, for when judge module 306 judgement shape library interface identifier graph of a correspondence bank interfaces are common graphics bank interface, calls the public wrapper of shape library; Common graphics bank interface is other all shape library interfaces except difference figure bank interface;
The 4th calling module 308, for directly being called figure bank interface sign graph of a correspondence storehouse by the public wrapper of shape library.
Wherein, the 3rd calling module 307, also for before calling the public wrapper of shape library, is packaged into identical shape library interface by all common graphics bank interfaces of different editions, and is encapsulated in the public wrapper of shape library.
Particularly, difference processing module 304 comprises:
Division unit, for before difference figure bank interface is carried out to difference processing, according to shape library version identifier, difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
Particularly, difference processing module 305, includes but not limited to lower unit:
The first processing unit, for the interface parameters number that provides when difference shape library interface more than or while being less than the interface parameters number in shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of shape library;
The second processing unit, while there are differences for the interface function in the interface function that provides when difference shape library interface and shape library version identifier graph of a correspondence storehouse, the interface function difference figure bank interface being provided is packaged into the uniform interface identical with shape library function;
The 3rd processing unit, while there are differences for the interface name in the interface name that provides when difference shape library interface and shape library version identifier graph of a correspondence storehouse, the interface name difference figure bank interface being provided is packaged into the uniform interface identical with shape library title;
Fourth processing unit, for when the data member in shape library version identifier graph of a correspondence storehouse there are differences, by shape library difference processing layer to difference figure bank interface configuration new interface, new interface obtain the value of data member and return to shape library user or obtain the value of data member after save data member's value.
The equipment that the embodiment of the present invention provides, by introduce one deck shape library difference processing layer between shape library and shape library user, efficiently solve the problem that shape library difference in version is brought, and avoid the bulky problem of application package, save memory source, realized the compatibility of shape library different editions.
It should be noted that: the shape library invocation facility that above-described embodiment provides is when calling shape library, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure that is about to shape library invocation facility is divided into different functional modules, to complete all or part of function described above.In addition, the shape library invocation facility that above-described embodiment provides and shape library call method embodiment belong to same design, its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
These are only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. a shape library call method, is characterized in that, described method comprises:
Obtain shape library user's call request, described call request comprises shape library interface identifier;
When described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtain the shape library version identifier of mobile terminal;
According to described shape library version identifier, call described shape library version identifier graph of a correspondence storehouse difference processing layer;
By described shape library difference processing layer, described difference figure bank interface is carried out to difference processing;
Difference figure bank interface after processing by difference calls described shape library version identifier graph of a correspondence storehouse.
2. method according to claim 1, is characterized in that, described when described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, before obtaining the shape library version identifier of mobile terminal, comprising:
According to described shape library interface identifier, judge whether described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
3. method according to claim 2, is characterized in that, described according to described shape library interface identifier, judges that whether described shape library interface identifier graph of a correspondence bank interface is after difference figure bank interface, also comprises:
When described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, call the public wrapper of shape library; Described common graphics bank interface is other all shape library interfaces except described difference figure bank interface;
By the public wrapper of described shape library, directly call described shape library interface identifier graph of a correspondence storehouse.
4. method according to claim 3, is characterized in that, described when described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, before calling the public wrapper of shape library, also comprises:
All common graphics bank interfaces of different editions are packaged into identical shape library interface, and are encapsulated in the public wrapper of described shape library.
5. method according to claim 1, is characterized in that, described according to described shape library version identifier, before calling described shape library version identifier graph of a correspondence storehouse difference processing layer, also comprises:
According to described shape library version identifier, described difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
6. method according to claim 1, is characterized in that, by described shape library difference processing layer, described difference figure bank interface is carried out to difference processing, includes but not limited to following mode:
The interface parameters number providing when described difference figure bank interface more than or while being less than the interface parameters number in described shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of described shape library;
Or,
When the interface function providing when described difference figure bank interface and the interface function in described shape library version identifier graph of a correspondence storehouse there are differences, the interface function described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library function;
Or,
When the interface name providing when described difference figure bank interface and the interface name in described shape library version identifier graph of a correspondence storehouse there are differences, the interface name described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library title;
Or,
When the data member in described shape library version identifier graph of a correspondence storehouse there are differences, by described shape library difference processing layer, described difference figure bank interface is configured to new interface, described new interface is obtained the value of described data member and is returned to described shape library user or obtain the value of preserving described data member after the value of described data member.
7. a shape library invocation facility, is characterized in that, described equipment comprises:
The first acquisition module, for obtaining shape library user's call request, described call request comprises shape library interface identifier;
The second acquisition module, for when described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface, obtains the shape library version identifier of mobile terminal;
The first calling module, for according to described shape library version identifier, calls described shape library version identifier graph of a correspondence storehouse difference processing layer;
Difference processing module, for carrying out difference processing by described shape library difference processing layer to described difference figure bank interface;
The second calling module, calls described shape library version identifier graph of a correspondence storehouse for the difference figure bank interface after processing by difference.
8. equipment according to claim 7, is characterized in that, described equipment comprises:
Judge module, before obtaining the shape library version identifier of described mobile terminal at the second acquisition module, according to described shape library interface identifier, judges whether described shape library interface identifier graph of a correspondence bank interface is difference figure bank interface.
9. equipment according to claim 8, is characterized in that, described equipment comprises:
The 3rd calling module, when judging that when described judge module described shape library interface identifier graph of a correspondence bank interface is common graphics bank interface, calls the public wrapper of shape library; Described common graphics bank interface is other all shape library interfaces except described difference figure bank interface;
The 4th calling module, for directly being called described shape library interface identifier graph of a correspondence storehouse by the public wrapper of described shape library.
10. equipment according to claim 9, it is characterized in that, described the 3rd calling module, also for before calling the public wrapper of shape library, is packaged into identical shape library interface by all common graphics bank interfaces of different editions, and is encapsulated in the public wrapper of described shape library.
11. equipment according to claim 7, is characterized in that, described difference processing module comprises:
Division unit, for before described difference figure bank interface is carried out to difference processing, according to described shape library version identifier, described difference figure bank interface is divided into the shape library difference processing layer of different graphic storehouse version identifier, each shape library difference processing layer correspondence a shape library version identifier.
12. equipment according to claim 7, is characterized in that, by difference processing module, include but not limited to lower unit:
The first processing unit, for the interface parameters number that provides when described difference figure bank interface more than or while being less than the interface parameters number in described shape library version identifier graph of a correspondence storehouse, discard a useless interface parameters or configure a corresponding interface parameters to adapt to the interface parameters requirement of described shape library;
The second processing unit, while there are differences for the interface function in the interface function that provides when described difference figure bank interface and described shape library version identifier graph of a correspondence storehouse, the interface function described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library function;
The 3rd processing unit, while there are differences for the interface name in the interface name that provides when described difference figure bank interface and described shape library version identifier graph of a correspondence storehouse, the interface name described difference figure bank interface being provided is packaged into the uniform interface identical with described shape library title;
Fourth processing unit, for when the data member in described shape library version identifier graph of a correspondence storehouse there are differences, by described shape library difference processing layer, described difference figure bank interface is configured to new interface, described new interface is obtained the value of described data member and is returned to described shape library user or obtain the value of preserving described data member after the value of described data member.
CN201210273238.2A 2012-08-02 2012-08-02 A kind of shape library call method and equipment Active CN103577177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210273238.2A CN103577177B (en) 2012-08-02 2012-08-02 A kind of shape library call method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210273238.2A CN103577177B (en) 2012-08-02 2012-08-02 A kind of shape library call method and equipment

Publications (2)

Publication Number Publication Date
CN103577177A true CN103577177A (en) 2014-02-12
CN103577177B CN103577177B (en) 2018-07-13

Family

ID=50049029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210273238.2A Active CN103577177B (en) 2012-08-02 2012-08-02 A kind of shape library call method and equipment

Country Status (1)

Country Link
CN (1) CN103577177B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402749A (en) * 2017-04-14 2017-11-28 阿里巴巴集团控股有限公司 Realize the method and device in picture loading storehouse
CN107918592A (en) * 2017-11-30 2018-04-17 郑州云海信息技术有限公司 A kind of method of compatibility highest version interface

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277301A (en) * 2008-04-24 2008-10-01 华为技术有限公司 Method and device for invocation of distributed system interface
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN101667139A (en) * 2009-10-13 2010-03-10 金蝶软件(中国)有限公司 Service program invocation method based on aggregate type object, device and system therefor
CN102331931A (en) * 2011-07-25 2012-01-25 深圳市万兴软件有限公司 Dynamic library managing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277301A (en) * 2008-04-24 2008-10-01 华为技术有限公司 Method and device for invocation of distributed system interface
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN101667139A (en) * 2009-10-13 2010-03-10 金蝶软件(中国)有限公司 Service program invocation method based on aggregate type object, device and system therefor
CN102331931A (en) * 2011-07-25 2012-01-25 深圳市万兴软件有限公司 Dynamic library managing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402749A (en) * 2017-04-14 2017-11-28 阿里巴巴集团控股有限公司 Realize the method and device in picture loading storehouse
CN107402749B (en) * 2017-04-14 2020-07-07 阿里巴巴集团控股有限公司 Method and device for realizing picture loading library
CN107918592A (en) * 2017-11-30 2018-04-17 郑州云海信息技术有限公司 A kind of method of compatibility highest version interface

Also Published As

Publication number Publication date
CN103577177B (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN109325195B (en) Rendering method and system for browser, computer device and computer storage medium
CN106547580B (en) Method and device for hooking function, mobile terminal and storage medium
CN103049320B (en) In browser, start the method and apparatus of external application
CN107045438B (en) Application top view processing method, device and component
CN108572818A (en) A kind of user interface rendering intent and device
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN103927180A (en) Implementation method for functional plug-ins based on Android system and system of functional plug-ins based on Android system
CN102207873A (en) Realizing method of JavaScript extended object based on Android platform, and binding interface structure
AU2019256257A1 (en) Processor core scheduling method and apparatus, terminal, and storage medium
CN111651219A (en) Method and equipment for managing multi-module project configuration file
CN112181378B (en) Method and device for realizing business process
CN110069247A (en) A kind of development approach and device, application method and device of application program
CN105847319A (en) Mobile terminal network request method and system
CN107133045A (en) Cross-platform game engine multi-threading correspondence method, device, storage medium and equipment
CN112612460B (en) Interface encapsulation and calling method, electronic device and storage medium
CN107391272A (en) The method and terminal of multi-process data interaction
CN108268261B (en) UI (user interface) customization method of intelligent terminal, storage medium and intelligent terminal
CN103577177A (en) Method and equipment for invoking graphics libraries
CN101339508A (en) Java2 miniature edition application operation method and device
CN112243033B (en) Method, device and equipment for acquiring memory information and computer readable storage medium
CN111966508A (en) Message batch sending method and device, computer equipment and storage medium
CN108804236B (en) AIDL file sharing method and system
CN108009084B (en) Testing method, device and system for hybrid mobile application
CN112527535B (en) Interaction method and terminal based on native WebView extension application
CN112181690B (en) Cross-end webpage display method, storage medium, electronic equipment and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221123

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518100

Patentee after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 2 East 403 room, SEG science and technology garden, Futian District, Guangdong, Shenzhen 518000, China

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.