CN105786479B - A kind of synthesis EMS memory management process and system - Google Patents

A kind of synthesis EMS memory management process and system Download PDF

Info

Publication number
CN105786479B
CN105786479B CN201410836471.6A CN201410836471A CN105786479B CN 105786479 B CN105786479 B CN 105786479B CN 201410836471 A CN201410836471 A CN 201410836471A CN 105786479 B CN105786479 B CN 105786479B
Authority
CN
China
Prior art keywords
interface
synthesis
calling
hwcomposer
function
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.)
Active
Application number
CN201410836471.6A
Other languages
Chinese (zh)
Other versions
CN105786479A (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.)
Leadcore Technology Co Ltd
Original Assignee
Leadcore Technology 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 Leadcore Technology Co Ltd filed Critical Leadcore Technology Co Ltd
Priority to CN201410836471.6A priority Critical patent/CN105786479B/en
Publication of CN105786479A publication Critical patent/CN105786479A/en
Application granted granted Critical
Publication of CN105786479B publication Critical patent/CN105786479B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of synthesis EMS memory management process and system, is applied to Android platform, comprising: eglSwapBuffersVIV interface is added in EGL;When carrying out 2D synthesis in SurfaceFlinger, the eglSwapBuffersVIV interface is called;When carrying out 3D synthesis in SurfaceFlinger, eglSwapBuffers interface is called.The present invention has invoked different interfaces when carrying out different synthesis, avoids image entanglement problem when toggling.

Description

A kind of synthesis EMS memory management process and system
Technical field
The present invention relates to communication technique field, in particular to a kind of synthesis EMS memory management process and system.
Background technique
Intelligent mobile phone terminal field needs to close the content of multiple windows according to the position of window, size, lamination order As piece image, it is saved in frame buffer zone, LCD is given and shows.This synthetic work is usually to lean on GPU (image processor) complete At, but in order to reduce power consumption, cruise duration is improved, 2D chip can be added.The synthesis of 3D chip is not needed most of the time, just GPU can be allowed to rest, change and 2D chip accelerator is allowed to complete synthetic work.Thus it is related to buffering frame when 2D and 3D synthesis switching The problem of management in area.
Referring to FIG. 1, it is the composition sequence figure of the primary platform of Android.As shown in Figure 1, SurfaceFlinger is The higher management of entire Android display system, controls the superposition of each window, GPU or 2D accelerator is called to be synthesized. EGL is a set of standard API relevant to window operation in OpenGL ES.BufferQueue is buffer queue, for picture streams Freely, three frame buffers are usually contained.HWComposer is hardware synthesizer, is in fact exactly the encapsulation to 2D accelerator. Framebuffer_device_t is frame buffer zone equipment, and frame buffer zone feeding LCD is responsible for show.
It can be seen that SurfaceFlinger after each window for being ready to synthesis from the timing diagram of Fig. 1, just call EGL standard interface eglSwapBuffers.In this interface, the dequeueBuffer function of BufferQueue is called first A piece of frame buffer zone is obtained, then starts GPU and the content of each window is synthesized on this piece frame buffer zone, then call The queueBuffer function of BufferQueue.BufferQueue will call the fbPost function of HWComposer, this piece HWComposer is given in synthetic frame buffer zone, the destination buffer as 2D accelerator.Finally, SurfaceFlinger tune With the commit function of HWComposer, HWComposer will call the interface fb_post of framebuffer_device_t, Framebuffer_device_t send destination buffer into LCD is given to show.
It is to be synthesized for 3D, and 2D is synthesized above, SurfaceFlinger will not call EGL standard interface EglSwapBuffers, but call directly the commit function of HWComposer.HWComposer will start 2D accelerator into Row synthesis, finally can also call the interface fb_post of framebuffer_device_t, synthetic destination buffer is given Framebuffer_device_t is sent into LCD and shows.
But synthesized by the above method, it has the following deficiencies:
1) after 3D synthesis is switched to 2D synthesis, frame buffer zone is no longer rotated.That is, what 2D accelerator was synthesizing Destination buffer is exactly the frame buffer zone that LCD is being shown, this will lead to image entanglement.
If 2) 2D accelerator is allowed to manage frame buffer zone alone, the rotation of frame buffer zone is realized, be that can guarantee that 2D is synthesized When destination buffer be not frame buffer zone that LCD is being shown.But when 2D synthesis switches back into 3D synthesis, GPU is not aware that Frame buffer zone is rotated, so the destination buffer of 3D synthesis may be exactly the frame buffer zone that LCD is being shown.But, During this only occurs in switching, after EGL has rotated a frame buffer zone, normal condition has been entered.But it is of short duration Hua Ping also will affect user experience.
Summary of the invention
The purpose of the present invention is to provide a kind of synthesis EMS memory management process and systems, to solve existing synthesis memory method Mismanagement and the problem of bring image entanglement.
In order to solve the above technical problems, the present invention provides a kind of synthesis EMS memory management process, it is applied to Android platform, Include:
A first interface is added in EGL;
When carrying out 2D synthesis in SurfaceFlinger, the first interface is called;In SurfaceFlinger into When row 3D is synthesized, a second interface is called.
Further, described that 2D synthesis is carried out in SurfaceFlinger in the synthesis EMS memory management process When, the step of calling the first interface includes:
The dequeueBuffer function of BufferQueue is called to obtain a piece of frame buffer zone;
The queueBuffer function for calling BufferQueue makes BufferQueue call the fbPost of HWComposer Function gives HWComposer the piece frame buffer zone, the destination buffer as 2D accelerator;
SurfaceFlinger calls the commit function of HWComposer, and HWComposer starting 2D accelerator is closed At;
The interface fb_post for calling framebuffer_device_t, gives synthetic destination buffer Framebuffer_device_t is sent into liquid crystal display and shows.
Further, described that 3D synthesis is carried out in SurfaceFlinger in the synthesis EMS memory management process When, call a second interface the step of include:
The dequeueBuffer function of BufferQueue is called to obtain a piece of frame buffer zone;
Starting image processor is synthesized to the content of each window on the piece frame buffer zone;
The queueBuffer function for calling BufferQueue makes BufferQueue call the fbPost of HWComposer Function gives HWComposer the synthetic frame buffer zone, the destination buffer as 2D accelerator;
SurfaceFlinger calls the commit function of HWComposer, and HWComposer is made to call framebuffer_ The interface fb_post of device_t gives framebuffer_device_t the destination buffer and is sent into liquid crystal display Display.
Further, in the synthesis EMS memory management process, the first interface connects for eglSwapBuffersVIV Mouthful, the second interface is eglSwapBuffers interface.
Correspondingly, being applied to Android platform the present invention also provides a kind of synthesis internal storage management system, comprising:
Adding module, for adding a first interface in EGL;
Calling module calls the first interface when for carrying out 2D synthesis in SurfaceFlinger;? When carrying out 3D synthesis in SurfaceFlinger, a second interface is called.
Further, in the synthesis internal storage management system, in calling module, in SurfaceFlinger into When the first interface is called in row 2D synthesis, further includes:
First calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
Second calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the piece frame buffer zone, the destination buffer as 2D accelerator;
Third calling module calls the commit function of HWComposer, HWComposer for SurfaceFlinger Starting 2D accelerator is synthesized;
4th calling module, for calling the interface fb_post of framebuffer_device_t, synthetic target It gives framebuffer_device_t feeding liquid crystal display and shows in buffer area.
Further, in the synthesis internal storage management system, in calling module, in SurfaceFlinger into When a second interface is called in row 3D synthesis, further includes:
5th calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
The content of each window is synthesized to the piece frame buffer zone for starting image processor by synthesis module;
6th calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the synthetic frame buffer zone, the mesh as 2D accelerator Mark buffer area;
7th calling module calls the commit function of HWComposer for SurfaceFlinger, makes HWComposer calls the interface fb_post of framebuffer_device_t, and the destination buffer is given Framebuffer_device_t is sent into liquid crystal display and shows.
Further, in the synthesis internal storage management system, the first interface connects for eglSwapBuffersVIV Mouthful, the second interface is eglSwapBuffers interface.
The present invention has invoked different interfaces when carrying out different synthesis, avoids image entanglement when toggling Problem.In addition, not starting GPU in 2D synthesis, the movement for carrying out 3D synthesis is eliminated, the function of rotation frame buffer zone is only retained Can, maintain low-power consumption;Further, 2D accelerator design is simplified, directly uses the frame buffer zone for being transmitted through and as target Buffer area, without managing frame buffer zone alone;Further, unified by SurfaceFlinger triggering frame buffer zone wheel Turn, do not destroy primary framework, code structure is clear, is conducive to maintenance.
Detailed description of the invention
Fig. 1 is the synthesis timing diagram of the primary platform of existing Android;
Fig. 2 is the synthesis EMS memory management process of the embodiment of the present invention and the timing diagram of system.
Specific embodiment
Synthesis EMS memory management process proposed by the present invention and system are made below in conjunction with the drawings and specific embodiments further It is described in detail.According to following explanation and claims, advantages and features of the invention will be become apparent from.It should be noted that attached drawing It is all made of very simplified form and uses non-accurate ratio, only to convenient, lucidly the aid illustration present invention is implemented The purpose of example.
Referring to FIG. 2, it is the synthesis EMS memory management process of the embodiment of the present invention and the timing diagram of system.The present invention provides A kind of synthesis EMS memory management process is applied to Android platform, specifically includes the following steps:
S100: adding a first interface in EGL, and in the present embodiment, name first interface is EglSwapBuffersVIV interface, its function is similar to eglSwapBuffersVIV interface, is to synthesize in subsequent 2D When call.
S200: when carrying out 2D synthesis in SurfaceFlinger, the eglSwapBuffersVIV interface is called;? When carrying out 3D synthesis in SurfaceFlinger, a second interface is called, in the present embodiment, i.e. calling eglSwapBuffers Interface.
2D synthesis is carried out in SurfaceFlinger to call first when calling the eglSwapBuffersVIV interface The dequeueBuffer function of BufferQueue obtains a piece of frame buffer zone;Secondly, calling BufferQueue's QueueBuffer function makes BufferQueue call the fbPost function of HWComposer, which is given HWComposer, the destination buffer as 2D accelerator;Then SurfaceFlinger calls the commit of HWComposer Function, HWComposer starting 2D accelerator are synthesized;Finally, calling the interface fb_ of framebuffer_device_t Post gives framebuffer_device_t synthetic destination buffer and is sent into liquid crystal display (LCD) display.
3D synthesis is carried out in SurfaceFlinger to call first when calling the eglSwapBuffers interface The dequeueBuffer function of BufferQueue obtains a piece of frame buffer zone;Secondly starting image processor (GPU) is each The content of window is synthesized on the piece frame buffer zone;The queueBuffer function for then calling BufferQueue, makes BufferQueue calls the fbPost function of HWComposer, gives HWComposer the synthetic frame buffer zone, makees For the destination buffer of 2D accelerator;Finally, SurfaceFlinger calls the commit function of HWComposer, make HWComposer calls the interface fb_post of framebuffer_device_t, and the destination buffer is given Framebuffer_device_t is sent into liquid crystal display (LCD) display.
Correspondingly, being applied to Android platform the present invention also provides a kind of synthesis internal storage management system, comprising:
Adding module, for adding a first interface in EGL, in the present embodiment, name first interface is EglSwapBuffersVIV interface;And
Calling module calls the eglSwapBuffersVIV when for carrying out 2D synthesis in SurfaceFlinger Interface;When carrying out 3D synthesis in SurfaceFlinger, a second interface is called to call in the present embodiment EglSwapBuffers interface.
Specifically, it in calling module, is carried out in SurfaceFlinger described in 2D synthesis calling When eglSwapBuffersVIV interface, further includes:
First calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
Second calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the piece frame buffer zone, the destination buffer as 2D accelerator;
Third calling module calls the commit function of HWComposer, HWComposer for SurfaceFlinger Starting 2D accelerator is synthesized;
4th calling module, for calling the interface fb_post of framebuffer_device_t, synthetic target It gives framebuffer_device_t feeding liquid crystal display and shows in buffer area.
Further, it in calling module, is carried out in SurfaceFlinger described in 3D synthesis calling When eglSwapBuffers interface, further includes:
5th calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
The content of each window is synthesized to the piece frame buffer zone for starting image processor by synthesis module;
6th calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the synthetic frame buffer zone, the mesh as 2D accelerator Mark buffer area;
7th calling module calls the commit function of HWComposer for SurfaceFlinger, makes HWComposer calls the interface fb_post of framebuffer_device_t, and the destination buffer is given Framebuffer_device_t is sent into liquid crystal display and shows.
Base this, the present invention has invoked different interfaces when carrying out different synthesis, avoids figure when toggling As entanglement problem.In addition, not starting GPU in 2D synthesis, the movement for carrying out 3D synthesis is eliminated, only retains rotation frame buffer zone Function, maintain low-power consumption;Further, simplify 2D accelerator design, directly use be transmitted through frame buffer zone as Destination buffer, without managing frame buffer zone alone;Further, unified to be buffered by SurfaceFlinger trigger frame Area's rotation, does not destroy primary framework, and code structure is clear, is conducive to maintenance.
Foregoing description is only the description to present pre-ferred embodiments, not to any restriction of the scope of the invention, this hair Any change, the modification that the those of ordinary skill in bright field does according to the disclosure above content, belong to the protection of claims Range.

Claims (6)

1. a kind of synthesis EMS memory management process is applied to Android platform characterized by comprising
A first interface is added in EGL;
When carrying out 2D synthesis in SurfaceFlinger, the first interface is called;3D is carried out in SurfaceFlinger When synthesis, a second interface is called;
Described when carrying out 2D synthesis in SurfaceFlinger, the step of calling the first interface, includes:
The dequeueBuffer function of BufferQueue is called to obtain a piece of frame buffer zone;
The queueBuffer function for calling BufferQueue makes BufferQueue call the fbPost function of HWComposer, HWComposer is given the piece frame buffer zone, the destination buffer as 2D accelerator;
SurfaceFlinger calls the commit function of HWComposer, and HWComposer starting 2D accelerator is synthesized;
The interface fb_post for calling framebuffer_device_t, gives synthetic destination buffer Framebuffer_device_t is sent into display and shows.
2. synthesis EMS memory management process as described in claim 1, which is characterized in that described to be carried out in SurfaceFlinger When 3D is synthesized, the step of calling the second interface, includes:
The dequeueBuffer function of BufferQueue is called to obtain a piece of frame buffer zone;
Starting image processor is synthesized to the content of each window on the piece frame buffer zone, obtains synthetic frame buffer zone;
The queueBuffer function for calling BufferQueue makes BufferQueue call the fbPost function of HWComposer, HWComposer is given the synthetic frame buffer zone, the destination buffer as 2D accelerator;
SurfaceFlinger calls the commit function of HWComposer, and HWComposer is made to call framebuffer_ The interface fb_post of device_t gives framebuffer_device_t the destination buffer and is sent into liquid crystal display Display.
3. synthesis EMS memory management process as described in claim 1, which is characterized in that the first interface is EglSwapBuffersVIV interface, the second interface are eglSwapBuffers interface.
4. a kind of synthesis internal storage management system is applied to Android platform characterized by comprising
Adding module, for adding a first interface in EGL;
Calling module calls the first interface when for carrying out 2D synthesis in SurfaceFlinger;? When carrying out 3D synthesis in SurfaceFlinger, a second interface is called;
In the calling module, when carrying out the 2D synthesis calling first interface in SurfaceFlinger, further includes:
First calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
Second calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the piece frame buffer zone, the destination buffer as 2D accelerator;
Third calling module, the commit function of HWCompose is called for SurfaceFlinge, and HWComposer starts 2D Accelerator is synthesized;
4th calling module, for calling the interface fb_post of framebuffer_device_t, synthetic Target buffer It gives framebuffer_device_t feeding liquid crystal display and shows in area.
5. synthesis internal storage management system as claimed in claim 4, which is characterized in that in calling module, When carrying out 3D synthesis one second interface of calling in SurfaceFlinger, further includes:
5th calling module, for calling the dequeueBuffer function of BufferQueue to obtain a piece of frame buffer zone;
The content of each window is synthesized to the piece frame buffer zone for starting image processor, is synthesized by synthesis module Good frame buffer zone;
6th calling module calls BufferQueue for calling the queueBuffer function of BufferQueue The fbPost function of HWComposer gives HWComposer the synthetic frame buffer zone, the mesh as 2D accelerator Mark buffer area;
7th calling module calls the commit function of HWComposer for SurfaceFlinger, makes HWComposer tune With the interface fb_post of framebuffer_device_t, framebuffer_device_t is given the destination buffer Liquid crystal display is sent into show.
6. synthesis internal storage management system as claimed in claim 4, which is characterized in that the first interface is EglSwapBuffersVIV interface, the second interface are eglSwapBuffers interface.
CN201410836471.6A 2014-12-23 2014-12-23 A kind of synthesis EMS memory management process and system Active CN105786479B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410836471.6A CN105786479B (en) 2014-12-23 2014-12-23 A kind of synthesis EMS memory management process and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410836471.6A CN105786479B (en) 2014-12-23 2014-12-23 A kind of synthesis EMS memory management process and system

Publications (2)

Publication Number Publication Date
CN105786479A CN105786479A (en) 2016-07-20
CN105786479B true CN105786479B (en) 2019-05-28

Family

ID=56389733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410836471.6A Active CN105786479B (en) 2014-12-23 2014-12-23 A kind of synthesis EMS memory management process and system

Country Status (1)

Country Link
CN (1) CN105786479B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988357B (en) * 2021-04-14 2021-07-27 湖北亿咖通科技有限公司 Panoramic image display method, computer storage medium and electronic device
CN117369936B (en) * 2023-12-04 2024-03-08 武汉凌久微电子有限公司 Display content rendering method and rendering system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8069450B2 (en) * 2003-01-27 2011-11-29 Hewlett-Packard Development Company, L.P. Computer operating system data management
CN103106058A (en) * 2013-01-25 2013-05-15 Tcl集团股份有限公司 Double-screen display method and intelligent display terminal based on android platform
CN103646638A (en) * 2013-12-25 2014-03-19 厦门雅迅网络股份有限公司 Android platform based double-screen display method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8069450B2 (en) * 2003-01-27 2011-11-29 Hewlett-Packard Development Company, L.P. Computer operating system data management
CN103106058A (en) * 2013-01-25 2013-05-15 Tcl集团股份有限公司 Double-screen display method and intelligent display terminal based on android platform
CN103646638A (en) * 2013-12-25 2014-03-19 厦门雅迅网络股份有限公司 Android platform based double-screen display method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Android显示服务器——SurfaceFlinger研究";杨倩 等;《计算机应用与软件》;20140630;第1-3页

Also Published As

Publication number Publication date
CN105786479A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
EP3789875A1 (en) Task processing method, apparatus, terminal, and computer readable storage medium
CN103338302B (en) A kind of method of interaction experience of double-screen touch mobile phone
CN108713185A (en) Electronic device and its display and the method for sending image
EP4148567A1 (en) Adaptive card generation method, terminal device and server
WO2023142995A1 (en) Data processing method and related apparatus
CN116055786B (en) Method for displaying multiple windows and electronic equipment
CN104731721B (en) A kind of display sharing method and device of memory
CN112825232B (en) Compensation method and electronic equipment
WO2022037726A1 (en) Split-screen display method and electronic device
WO2023000772A1 (en) Mode switching method and apparatus, electronic device and chip system
CN105786479B (en) A kind of synthesis EMS memory management process and system
CN105938440A (en) Picture display method and system for mobile terminal
CN116991354A (en) Data processing method and related device
WO2022007862A1 (en) Image processing method, system, electronic device and computer readable storage medium
CN105101155A (en) Configuration information sending method, function configuring and synchronizing method, and mobile terminal and system
CN115097994B (en) Data processing method and related device
CN113986162B (en) Layer composition method, device and computer readable storage medium
US20230367415A1 (en) Event processing method and device
CA2891927C (en) Method and apparatus for traffic management scheduling
CN115048012B (en) Data processing method and related device
CN105764127B (en) A kind of method sending data and a kind of mobile terminal
WO2023124227A1 (en) Frame rate switching method and device
WO2023124225A1 (en) Frame rate switching method and apparatus
CN115686403A (en) Display parameter adjusting method, electronic device, chip and readable storage medium
WO2023124149A1 (en) Image processing method, electronic device, and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160720

Assignee: Shanghai Li Ke Semiconductor Technology Co., Ltd.

Assignor: Leadcore Technology Co., Ltd.

Contract record no.: 2018990000159

Denomination of invention: Synthesis memory management method and system

License type: Common License

Record date: 20180615

GR01 Patent grant
GR01 Patent grant