CN114510207A - Layer composition method, device, equipment, medium and program product - Google Patents
Layer composition method, device, equipment, medium and program product Download PDFInfo
- Publication number
- CN114510207A CN114510207A CN202210190787.7A CN202210190787A CN114510207A CN 114510207 A CN114510207 A CN 114510207A CN 202210190787 A CN202210190787 A CN 202210190787A CN 114510207 A CN114510207 A CN 114510207A
- Authority
- CN
- China
- Prior art keywords
- layers
- layer
- cache
- display system
- synthesis
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 239000000203 mixture Substances 0.000 title claims description 54
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 86
- 238000003786 synthesis reaction Methods 0.000 claims abstract description 86
- 230000008569 process Effects 0.000 claims abstract description 30
- 230000008859 change Effects 0.000 claims abstract description 12
- 230000002194 synthesizing effect Effects 0.000 claims description 11
- 238000009877 rendering Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 3
- 238000001308 synthesis method Methods 0.000 abstract description 25
- 239000002131 composite material Substances 0.000 description 14
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1407—General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
- G06F1/3265—Power saving in display device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The application provides a layer synthesis method, a device, equipment, a medium and a program product, firstly, a layer synthesis process is started, and then whether the layer state of a current frame accords with a preset synthesis scene is judged, the preset synthesis scene is that a display system has a first number of layers, and a second number of layers in the first number of layers are not covered by other layers and change in continuous frames, if the preset synthesis scene accords with the preset synthesis scene, and when the display system is determined to be in a cache superposition mode, the second number of layers and the cache layers are superposed to obtain a synthesis layer, and the unchanged layers in the first number of layers are synthesized on the cache layers, so that layer synthesis in the current synthesis scene is realized, and the update of a display picture is completed. The layer synthesis method provided by the application can greatly reduce the number of layers during layer synthesis, reduce synthesis overhead, improve synthesis efficiency, further improve battery endurance of a display system, and avoid the occurrence of user interface jamming.
Description
Technical Field
The present application relates to the field of image display technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for layer composition.
Background
The Surface flag is a display core of an Android system and is responsible for uniformly synthesizing and displaying user visible layers such as an application interface, a status bar, a navigation system status and the like, and the synthesis efficiency of the Surface flag directly determines the system fluency.
In a current display system, for example, an Android display system, all layers required to be displayed in the system are recorded by using a layer stack (layertack) of a Z-order, one-time image synthesis is a process of overlaying all the layers, and the more layers are, the higher the synthesis overhead is, and the longer the time is consumed. Even in a scene with only one or two layer changes, such as navigation, reading, audio/video playing, etc., the system needs to synthesize all the layers again, which is a root cause of high Surface flag load and low synthesis efficiency, and even causes the user interface to be stuck in a complex display scene.
Therefore, a solution for layer composition is needed to overcome the defects of the current layer composition.
Disclosure of Invention
The application provides a layer synthesis method, device, equipment, medium and program product, which are used for solving the technical problems of high synthesis overhead and low synthesis efficiency caused by the fact that all layers are superposed to synthesize all layers again in the existing layer synthesis.
In a first aspect, the present application provides a layer composition method, including:
starting a layer composition process;
judging whether the layer state of the current frame conforms to a preset composite scene, wherein the preset composite scene refers to a scene in which a display system has a first number of layers, and a second number of layers are not covered by other layers in the first number of layers and change in continuous frames;
if yes, when the display system is determined to be in a cache superposition mode, superposing the second number of layers and the cache layers to obtain a synthesized layer, wherein unchanged layers in the first number of layers are synthesized on the cache layers.
In one possible design, before the display system is in the cache overlay mode for the first time, the method further includes:
rendering unchanged layers of the first number of layers onto the cache layer, the cache layer being generated by the layer composition process when the display system is initialized;
and backing up a main layer stack of the display system, setting the display system to be in the cache superposition mode, wherein the main layer stack comprises the first number of layers.
In a possible design, if it is determined that the layer state of the current frame does not conform to the preset composite scene, the method further includes:
judging whether the display system is in a cache superposition mode or not;
if so, clearing the cache layer, recovering the main layer stack and setting the display system to exit the cache superposition mode so as to obtain the synthetic layer by adopting a native mode;
and if not, obtaining the synthetic image layer by adopting a native mode.
In a possible design, the determining whether the layer state of the current frame conforms to a preset composite scene includes:
judging whether the first number is larger than a first preset number or not and whether the attributes of the first number of layers are unchanged or not;
judging whether the second number is smaller than a second preset number or not and whether the second number of layers are not covered by other layers or not;
judging whether the second number of layers of the current frame and the previous frame are the same layer or not;
and if all the judgment results are yes, determining that the layer state of the current frame conforms to the preset synthesis scene.
In a possible design, after obtaining the synthesized layer, the method further includes:
and sending the synthesized layer to a display device to complete the picture updating of the current frame.
In one possible design, the display system comprises an in-vehicle display system or a mobile phone display system.
In a second aspect, the present application provides an image layer synthesizing apparatus, including:
the starting module is used for starting the layer composition process;
the device comprises a judging module, a synthesizing module and a synthesizing module, wherein the judging module is used for judging whether the layer state of the current frame accords with a preset synthetic scene, and the preset synthetic scene refers to a scene that a display system has a first number of layers, and a second number of layers are not covered by other layers and change in continuous frames in the first number of layers;
and the processing module is used for superposing the second number of layers and the cache layers to obtain a synthesized layer if the layer state of the current frame is determined to be in accordance with the preset synthesized scene and the display system is determined to be in the cache superposition mode, wherein the cache layers are synthesized with unchanged layers in the first number of layers.
In a possible design, the layer composition apparatus further includes: a cache mode initialization module; the cache mode initialization module is configured to:
rendering unchanged layers of the first number of layers onto the cache layer, the cache layer being generated by the layer composition process when the display system is initialized;
and backing up a main layer stack of the display system, setting the display system to be in the cache superposition mode, wherein the main layer stack comprises the first number of layers.
In a possible design, if it is determined that the layer state of the current frame does not conform to the preset composite scene, the processing module is further configured to:
judging whether the display system is in a cache superposition mode or not;
if so, clearing the cache layer, recovering the main layer stack and setting the display system to exit the cache superposition mode so as to obtain the synthetic layer by adopting a native mode;
and if not, obtaining the synthetic image layer by adopting a native mode.
In a possible design, the determining module is specifically configured to:
judging whether the first number is larger than a first preset number or not and whether the attributes of the first number of layers are unchanged or not;
judging whether the second number is smaller than a second preset number or not and whether the second number of layers are not covered by other layers or not;
judging whether the second number of layers of the current frame and the previous frame are the same layer or not;
and if all the judgment results are yes, determining that the layer state of the current frame conforms to the preset synthesis scene.
In one possible design, the layer composition apparatus further includes: a sending module; the sending module is configured to:
and sending the synthesized layer to a display device to complete the picture updating of the current frame.
In one possible design, the display system comprises an in-vehicle display system or a mobile phone display system.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement any one of the possible layer composition methods as provided by the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are used to implement any one of the possible image layer composition methods as provided in the first aspect.
In a fifth aspect, the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are executed by a processor to implement any one of the possible layer composition methods provided in the first aspect.
The application provides a layer synthesis method, a device, equipment, a medium and a program product, firstly, a layer synthesis process is started, and then whether the layer state of a current frame accords with a preset synthesis scene is judged, the preset synthesis scene is a scene that a display system has a first number of layers, and a second number of layers are not covered by other layers and change in continuous frames in the first number of layers, if so, and when the display system is determined to be in a cache superposition mode, the second number of layers and the cache layers are superposed to obtain a synthesis layer, so that the layer synthesis in the current synthesis scene is realized, and the updating of a display picture is completed. The layer synthesis method provided by the application can greatly reduce the number of layers during layer synthesis, reduce synthesis overhead, improve synthesis efficiency, further improve battery endurance of a display system, and avoid the occurrence of user interface jamming.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a layer synthesis method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another layer composition method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another layer synthesis method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a layer composition process according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a layer composition apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another layer composition apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of methods and apparatus consistent with certain aspects of the present application, as detailed in the appended claims.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In a current display system, for example, an Android display system, all layers required to be displayed in the system are recorded by using a layer stack (layertack) of a Z-order, one-time image synthesis is a process of overlaying all the layers, and the more layers are, the higher the synthesis overhead is, and the longer the time is consumed. Even in a scene with only one or two layer changes, such as navigation, reading, audio/video playing, etc., the system needs to synthesize all the layers again, which is a root cause of high Surface flag load and low synthesis efficiency, and even causes the user interface to be stuck in a complex display scene.
In view of the above problems in the prior art, the present application provides a layer composition method, apparatus, device, medium, and program product. The invention conception of the layer synthesis method provided by the application is as follows: the method comprises the steps of fixing the composition of system layers such as navigation, reading, audio and video playing and the like, judging scenes which have few content updating layers and are not shielded by other layers, and directly completing the updating of a display picture by once synthesizing a cache layer and a change layer when a display system needs to synthesize the layers for displaying if the layer state of a current frame conforms to the scenes. The cache layer can be created when the scene is met, and an invariant layer of the display system is rendered on the cache layer, so that the invariant layer and the variant layer of the display system can be divided. The layer synthesis method is used for carrying out layer synthesis without synthesizing all layers every time, so that the number of layers during system synthesis is greatly reduced, the synthesis efficiency is improved, the battery endurance of a display system can be improved, and the occurrence of user interface unsmooth conditions is reduced.
An exemplary application scenario of the embodiments of the present application is described below.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, and as shown in fig. 1, a vehicle 100 is configured with a vehicle-mounted display system 101, for example, an Android display system, for providing an infotainment function, for example, providing functions of navigation, reading, audio/video playing, and the like, for the vehicle. The surfaceflag is a display core of the vehicle-mounted display system 101, and is responsible for uniformly synthesizing and displaying user visible image layers such as an application interface, a status bar, a navigation system status and the like. The layer synthesis method provided by the embodiment of the present application can be executed when layer synthesis is performed by using a surfefinger operating in the vehicle-mounted display system 101.
The electronic device 102 may be configured as a corresponding hardware device capable of executing the layer composition method provided by the embodiment of the present application. The electronic device 102 may be a computer, a tcu (transmission Control unit), or the like, and the type of the electronic device 102 is not limited in the embodiment of the present application, and the electronic device 102 in fig. 1 is illustrated by taking a computer as an example.
It should be noted that the application scenario is only exemplarily illustrated by taking a vehicle-mounted display system as a system for performing layer synthesis, and the layer synthesis method provided in the embodiment of the present application may also be used for performing layer synthesis for other display systems such as a mobile phone display system. The layer composition method, device, apparatus, medium, and program product provided in the embodiments of the present application include, but are not limited to, the above application scenarios.
Fig. 2 is a schematic flowchart of a layer synthesis method according to an embodiment of the present application. As shown in fig. 2, a layer synthesis method provided in an embodiment of the present application includes:
s101: and starting the layer composition process.
This step is an entry for the display system to perform layer composition. For example, after the surfefinger receives a refresh message of a vertical synchronization signal (Vsync), it starts to compose a new display screen for the display device, in other words, for example, a layer composition process may be started in response to the vertical synchronization signal, and the layer composition process is the surfefinger.
S102: and judging whether the layer state of the current frame conforms to a preset synthetic scene.
The preset synthetic scene is a scene in which the display system has a first number of layers, and a second number of layers in the first number of layers are not covered by other layers and change in continuous frames.
And judging whether the layer state of the current frame conforms to a preset synthetic scene. The preset composite scene is a scene in which the display system has a large number of layers, but only a small number of layers are not covered by other layers and change in continuous frames, wherein the large number of layers are characterized by a first number of layers, and a small number of layers which are not covered by other layers and change in continuous frames in the first number of layers are characterized by a second number of layers, obviously, the second number is smaller than the first number. The specific values of the first quantity and the second quantity are determined by an actual display interface, and the display interface is used for displaying states of navigation, reading, audio and video playing and the like.
The layer state of the current frame is used for representing the state of a layer corresponding to the picture needing to be updated of the current frame. The embodiment of the present application does not limit the specific content of the layer corresponding to the picture to be updated, and is specifically determined by the content of the display picture.
S103: if yes, overlapping the second number of layers with the cache layers to obtain a synthesized layer when the display system is determined to be in the cache overlapping mode.
And the cache layer is synthesized with unchanged layers in the first number of layers.
If the layer state of the current frame is determined to be in accordance with the preset synthesis scene through judgment, that is, if the judgment result is yes, further when the display system is determined to be in the cache superposition mode, superposing the small number of layers which are not covered by other layers and change in continuous frames in the second number of layers, that is, the first number of layers, with the cache layers to obtain synthesis layers, and performing one-time synthesis to complete the updating of the display picture without synthesizing all layers again for the scene with only a small number of layers changing as in the prior art.
The cache layer is synthesized with an unchanged layer of the first number of layers, and the unchanged layer refers to a layer, which does not need to be changed in the current frame, relative to the second number of layers.
The layer synthesis method provided by the embodiment of the application starts a layer synthesis process, then judges whether the layer state of a current frame accords with a preset synthesis scene, if so, and superposes a second number of layers with a cache layer to obtain a synthesis layer when the display system is determined to be in a cache superposition mode, wherein the cache layer is synthesized with an unchanged layer in a first number of layers, so that layer synthesis in the current synthesis scene is realized, and updating of a display picture is completed. The layer synthesis method provided by the embodiment of the application can greatly reduce the number of layers during layer synthesis, reduce synthesis overhead, improve synthesis efficiency, further improve battery endurance of a display system, and avoid occurrence of user interface jamming.
Fig. 3 is a schematic flowchart of another layer composition method according to an embodiment of the present application. As shown in fig. 3, a layer synthesis method provided in an embodiment of the present application includes:
s201: and starting the layer composition process.
The implementation manner, principle and technical effect of step S201 are similar to those of step S101, and the detailed content can refer to the foregoing detailed description, which is not repeated herein.
S202: and judging whether the layer state of the current frame conforms to a preset synthetic scene.
And carrying out scene recognition on the layer state of the current frame to judge whether the layer state accords with a preset synthetic scene.
In one possible design, possible implementations of step S202 include:
judging whether the first number is larger than a first preset number and whether the attributes of the layers of the first number are unchanged;
judging whether the second quantity is smaller than a second preset quantity or not and whether the second quantity of layers are not covered by other layers or not;
and judging whether the second number of layers of the current frame and the previous frame are the same layer or not.
Specifically, it is determined whether the number of the first number of layers of the display system, that is, the first number, is greater than a first preset number, so as to determine whether the display system has a large number of layers, where a value of the first preset number is determined by an actual situation. And whether the attributes of the first number of layers are unchanged. The attributes can be understood as the attributes of the display represented by the layer.
And judging whether a second number of layers in the first number of layers of the display system is smaller than a second preset number or not so as to determine whether a small number of layers of the display system are changed or not, wherein the value of the second preset number is determined by actual conditions. And whether the second number of layers are not covered by other layers.
And judging whether the changed layer changes in the continuous frames, namely whether the layer in which the current frame changes and the layer in which the previous frame changes are the same layer.
After the determination, if all the determination results in the above steps are yes, it indicates that the layer state of the current frame conforms to the preset synthesis scene, and then step S203 is executed. Otherwise, if at least one of the determination results in the above steps is negative, it indicates that the layer state of the current frame does not conform to the preset synthesis scene, and then step S204 is executed.
S203: and if so, determining that the layer state of the current frame conforms to the preset synthetic scene.
S204: if not, determining that the layer state of the current frame does not accord with the preset synthesis scene.
When it is determined that the layer state of the current frame conforms to the preset composite scene, that is, after step S203 is executed, step S205 is further executed.
S205: it is determined whether the display system is in a cache overlay mode.
S206: if yes, overlapping the second number of layers with the cache layers to obtain a synthetic layer.
S207: if not, setting the display system to be in a cache superposition mode.
In step S205, it is determined whether the display system is in the cache overlay mode, if yes, the map overlay is directly performed to obtain the synthetic map layer, that is, the second number of map layers and the cache map layer are overlaid to obtain the synthetic map layer, that is, step S206 is executed.
If it is determined in step S205 that the display system is not in the cache overlay mode, which usually occurs before the display system is in the cache overlay mode for the first time, the state of the display system needs to be set to be in the cache overlay mode, that is, step S207 is executed to make the display system be in the cache overlay mode, and then the overlay step in step S206 is executed to overlay the second number of layers and the cache layers to obtain the synthesized layer.
In the process of setting the display system in the cache superposition mode, the unchanged layers are rendered on the cache layers, and then the second number of layers and the cache layers can be superposed to obtain the synthetic layers.
When it is determined that the layer state of the current frame does not conform to the preset composite scene, that is, after step S204 is executed, step S208 is further executed.
S208: it is determined whether the display system is in a cache overlay mode.
S209: and if not, obtaining the synthetic image layer by adopting the native mode.
S2010: if so, clearing the cache layer, recovering the main layer stack and setting the display system to exit the cache superposition mode.
In step S208, it is determined whether the display system is in the cache overlay mode, if not, that is, the display system is not in the cache overlay mode, the native mode is adopted to obtain a synthesized layer, that is, step S209 is performed. The native mode may be a synthesis mode other than the cache overlay mode, for example, a corresponding mode in which all layers need to be synthesized in the prior art, and the like.
Otherwise, if it is determined in step S208 that the display system is not in the cache overlay mode, that is, the determination result is yes, but the layer state of the current frame does not conform to the preset composite scene, the cache layer maintained in the cache overlay mode needs to be cleared, the main layer stack is restored, and the display system is set to exit the cache overlay mode, that is, step S2010 is executed, and then the native mode may be further executed in step S209 to obtain the composite layer.
The main image layer stack comprises a first number of image layers of the display system, and the main image layer stack is backed up in the process of setting the display system to be in a cache superposition mode.
S2011: and sending the synthesized layer to a display device to complete the image updating of the current frame.
After the synthesis layer is obtained in step S206 or step S209, the synthesis layer is sent to the display device, so that the display device performs image display to complete image update of the current frame.
According to the layer synthesis method provided by the embodiment of the application, after the layer synthesis process is started, whether the layer state of the current frame meets the preset synthesis scene is judged. If the first number of layers are consistent with the second number of layers, whether the display system is in a cache superposition mode is further judged, if the display system is in the cache superposition mode, a second number of layers and the cache layers are superposed to obtain a synthesized layer, and unchanged layers in the first number of layers are synthesized on the cache layers. And if the display system is not in the cache superposition mode, setting the display system to be in the cache superposition mode, and then superposing the second number of layers and the cache layers to obtain a synthetic layer. If the layer state of the current frame does not accord with the preset synthesis scene, a native mode is adopted to obtain a synthesis layer, and if the display system is in a cache superposition mode at the moment, the cache layer needs to be cleared, a main layer stack needs to be restored, and the display system needs to be set to exit the cache superposition mode. And after the synthesized layer is obtained, sending the synthesized layer to display equipment to complete the picture updating of the current frame. According to the layer synthesis method provided by the embodiment of the application, whether the layer state of the current frame is in the preset synthesis scene or not is judged, and when the layer state of the current frame is in the preset synthesis scene, a second number of layers and a cache layer are directly overlapped in a cache overlapping mode to obtain the synthesis layer, so that the number of the layers during layer synthesis is greatly reduced, the synthesis overhead is reduced, the synthesis efficiency is improved, the battery endurance of a system can be improved, and the occurrence of the user interface pause condition is avoided.
On the basis of the above embodiment, before the display system is in the cache overlay mode for the first time, the layer composition method provided in the embodiment of the present application further includes the steps shown in fig. 4. Fig. 4 is a schematic flowchart of another layer composition method according to an embodiment of the present application. As shown in fig. 4, a layer synthesis method provided in an embodiment of the present application includes:
s301: and rendering unchanged layers in the first number of layers to the cache layers.
The cache layer is generated by a layer synthesis process when the display system is initialized.
The buffer layer is generated by the layer composition process at the time of initialization of the display system, for example, a buffer layer with a display screen size may be created. And then, rendering the unchanged layer in the first number of layers onto a cache layer, so that the unchanged layer in the first number of layers is synthesized on the cache layer, for example, the area with the size of the display screen is the area where the unchanged layer in the display system is located, and thus the unchanged layer and the changed layer in the display system can be segmented.
S302: and backing up a main image layer stack of the display system, and setting the display system to be in a cache superposition mode.
The main image layer stack comprises a first number of image layers.
The method includes the steps that a first number of layers of a display system are backed up, and a set of the first number of layers can be regarded as a main layer stack, namely the main layer stack of the display system is backed up. And then setting a display system to be in a cache superposition mode, so that when the layer state of the current frame accords with a preset synthesis scene, a second number of layers and cache layers are directly adopted for superposition, the required layers are synthesized for one time, and the updating of the display picture is completed.
According to the layer synthesis method provided by the embodiment of the application, before the display system is in the cache superposition mode for the first time, unchanged layers in the first number of layers are rendered onto the cache layers to update the cache layers, a main layer stack of the display system is backed up, and the display system is set to be in the cache superposition mode, so that when the layer state of the current frame accords with a preset synthesis scene, the second number of layers and the cache layers can be superposed to obtain the synthesized layers through once synthesis, all layers do not need to be synthesized in the prior art, and the number of layers during layer synthesis is greatly reduced. In addition, the only overhead of the layer synthesis method provided by the embodiment of the application is only the generation of the cache layer and the updating of the cache layer, which obviously reduces the synthesis overhead compared with the prior art, and further can improve the synthesis efficiency.
Fig. 5 is a schematic diagram of a layer synthesis process provided in an embodiment of the present application, as shown in fig. 5, fig. 5 (a) shows a synthesis process in the prior art, and fig. 5 (b) shows a synthesis process using the layer synthesis method provided in the embodiment of the present application, where both are synthesis processes when only "lyrics" (i.e., LRC in fig. 5) are changed. And synthesizing by adopting the prior art, wherein all the image layers participate in the synthesis. If the layer synthesis method provided by the embodiment of the application is adopted, if the lyrics occur, the layer 1 and the layer 3 are changed, only the layer 1 and the layer 3 need to be superposed with the remaining unchanged layers 2, 4, 5 and 6, and only the layers 1 and 3 actually participate in synthesis. Compared with the prior art, the method has the advantages that the number of the synthesized layers is obviously reduced, the time consumption of the synthesized layers is shortened, and the synthesis efficiency is improved. The layers actually participating in the synthesis are indicated in fig. 5 with diagonal bars.
Fig. 6 is a schematic structural diagram of a layer composition apparatus according to an embodiment of the present application. As shown in fig. 6, an image layer synthesizing apparatus 400 provided in the embodiment of the present application includes:
a starting module 401, configured to start a layer composition process;
a determining module 402, configured to determine whether a layer state of a current frame conforms to a preset composite scene, where the preset composite scene is a scene in which a display system has a first number of layers, and a second number of layers in the first number of layers are not covered by other layers and change in a continuous frame;
the processing module 403 is configured to, if it is determined that the layer state of the current frame conforms to the preset composite scene, and when it is determined that the display system is in the cache overlay mode, overlay the second number of layers with the cache layer to obtain a composite layer, where an unchanged layer in the first number of layers is synthesized on the cache layer.
On the basis of fig. 6, fig. 7 is a schematic structural diagram of another layer synthesis apparatus according to an embodiment of the present application. As shown in fig. 7, the layer composition apparatus 400 provided in the embodiment of the present application further includes: a cache mode initialization module 404. The cache mode initialization module 404 is configured to:
rendering unchanged layers in the first number of layers to a cache layer, wherein the cache layer is generated by a layer synthesis process when a display system is initialized;
and backing up a main image layer stack of the display system, and setting the display system to be in a cache superposition mode, wherein the main image layer stack comprises a first number of image layers.
In a possible design, if it is determined that the layer state of the current frame does not conform to the preset synthesis scene, the processing module 403 is further configured to:
judging whether the display system is in a cache superposition mode or not;
if so, clearing the cache layer, recovering the main layer stack and setting the display system to exit the cache superposition mode so as to obtain a synthetic layer by adopting a native mode;
and if not, obtaining the synthetic image layer by adopting the native mode.
In one possible design, the determining module 402 is specifically configured to:
judging whether the first number is larger than a first preset number and whether the attributes of the layers of the first number are unchanged;
judging whether the second quantity is smaller than a second preset quantity or not and whether the second quantity of layers are not covered by other layers or not;
judging whether the second number of layers of the current frame and the previous frame are the same layer or not;
and if all the judgment results are yes, determining that the layer state of the current frame conforms to the preset synthesis scene.
In one possible design, the layer composition apparatus further includes: and a sending module. The sending module is configured to:
and sending the synthesized layer to a display device to complete the image updating of the current frame.
In one possible design, the display system comprises an in-vehicle display system or a mobile phone display system.
The layer synthesis apparatus provided in the embodiment of the present application may perform corresponding steps of the layer synthesis method in the foregoing method embodiment, and an implementation principle and a technical effect thereof are similar, and are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device 500 may include: a processor 501, and a memory 502 communicatively coupled to the processor 501.
The memory 502 is used for storing programs. In particular, the program may include program code comprising computer-executable instructions.
The processor 501 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
Alternatively, the memory 502 may be separate or integrated with the processor 501. When the memory 502 is a device separate from the processor 501, the electronic device 500 may further include:
a bus 503 for connecting the processor 501 and the memory 502. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Alternatively, in a specific implementation, if the memory 502 and the processor 501 are integrated on a chip, the memory 502 and the processor 501 may communicate through an internal interface.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used for the layer synthesis method in the foregoing embodiments.
The present application further provides a computer program product, which includes computer instructions, and when executed by a processor, the computer instructions implement the image layer composition method in the foregoing embodiments.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method for layer composition, comprising:
starting a layer composition process;
judging whether the layer state of the current frame conforms to a preset synthetic scene, wherein the preset synthetic scene is a scene that a display system has a first number of layers with fixed attributes, and a second number of layers are not covered by other layers and change in continuous frames in the first number of layers;
if yes, when the display system is determined to be in a cache superposition mode, superposing the second number of layers and the cache layers to obtain a synthesized layer, wherein unchanged layers in the first number of layers are synthesized on the cache layers.
2. The layer composition method according to claim 1, further comprising, before the display system is in the cache overlay mode for the first time:
rendering unchanged layers of the first number of layers onto the cache layer, the cache layer being generated by the layer composition process when the display system is initialized;
and backing up a main layer stack of the display system, setting the display system to be in the cache superposition mode, wherein the main layer stack comprises the first number of layers.
3. The layer composition method according to claim 2, wherein if it is determined that the layer state of the current frame does not conform to the preset composition scene, further comprising:
judging whether the display system is in a cache superposition mode or not;
if so, clearing the cache layer, recovering the main layer stack and setting the display system to exit the cache superposition mode so as to obtain the synthetic layer by adopting a native mode;
and if not, obtaining the synthetic image layer by adopting a native mode.
4. The layer composition method according to any one of claims 1 to 3, wherein the determining whether the layer state of the current frame conforms to a preset composition scene includes:
judging whether the first number is larger than a first preset number or not and whether the attributes of the first number of layers are unchanged or not;
judging whether the second number is smaller than a second preset number or not and whether the second number of layers are not covered by other layers or not;
judging whether the second number of layers of the current frame and the previous frame are the same layer or not;
and if all the judgment results are yes, determining that the layer state of the current frame conforms to the preset synthesis scene.
5. Layer composition method according to claim 4, characterized in that after said obtaining of the composition layer, it further comprises:
and sending the synthesized layer to a display device to complete the picture updating of the current frame.
6. Layer composition method according to claim 5, characterised in that the display system comprises a vehicle-mounted display system or a mobile phone display system.
7. An image layer composition apparatus, comprising:
the starting module is used for starting the layer composition process;
the device comprises a judging module, a judging module and a synthesizing module, wherein the judging module is used for judging whether the layer state of the current frame accords with a preset synthetic scene, the preset synthetic scene refers to a scene that a display system has a first number of layers with fixed attributes, and a second number of layers are not covered by other layers and change in continuous frames in the first number of layers;
and the processing module is used for superposing the second number of layers and the cache layers to obtain a synthesized layer if the layer state of the current frame is determined to be in accordance with the preset synthesized scene and the display system is determined to be in the cache superposition mode, wherein the cache layers are synthesized with unchanged layers in the first number of layers.
8. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the layer composition method according to any one of claims 1 to 6.
9. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the layer composition method according to any one of claims 1 to 6.
10. A computer program product comprising computer executable instructions for implementing the layer composition method of any of claims 1 to 6 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210190787.7A CN114510207B (en) | 2022-02-28 | 2022-02-28 | Layer synthesis method, device, equipment, medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210190787.7A CN114510207B (en) | 2022-02-28 | 2022-02-28 | Layer synthesis method, device, equipment, medium and program product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114510207A true CN114510207A (en) | 2022-05-17 |
CN114510207B CN114510207B (en) | 2024-09-13 |
Family
ID=81552924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210190787.7A Active CN114510207B (en) | 2022-02-28 | 2022-02-28 | Layer synthesis method, device, equipment, medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114510207B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024114322A1 (en) * | 2022-11-30 | 2024-06-06 | 腾讯科技(深圳)有限公司 | Picture rendering method and apparatus, device, storage medium, and program product |
CN118227069A (en) * | 2024-05-23 | 2024-06-21 | 鼎道智芯(上海)半导体有限公司 | Display control method and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055294A (en) * | 2016-05-23 | 2016-10-26 | 福州瑞芯微电子股份有限公司 | Layer composition optimization method and apparatus |
CN106874017A (en) * | 2017-03-10 | 2017-06-20 | 广东欧珀移动通信有限公司 | A kind of display scene recognition method of mobile terminal, device and mobile terminal |
CN108153505A (en) * | 2017-12-26 | 2018-06-12 | 掌阅科技股份有限公司 | Display methods, electronic equipment and the computer storage media of handwriting input content |
CN110018759A (en) * | 2019-04-10 | 2019-07-16 | Oppo广东移动通信有限公司 | Interface display method, device, terminal and storage medium |
CN110363831A (en) * | 2019-07-17 | 2019-10-22 | Oppo广东移动通信有限公司 | Layer composition, device, electronic equipment and storage medium |
CN110377264A (en) * | 2019-07-17 | 2019-10-25 | Oppo广东移动通信有限公司 | Layer composition, device, electronic equipment and storage medium |
CN112767231A (en) * | 2021-04-02 | 2021-05-07 | 荣耀终端有限公司 | Layer composition method and device |
CN113625983A (en) * | 2021-08-10 | 2021-11-09 | Oppo广东移动通信有限公司 | Image display method, image display device, computer equipment and storage medium |
CN113986162A (en) * | 2021-09-22 | 2022-01-28 | 荣耀终端有限公司 | Layer composition method, device and computer readable storage medium |
-
2022
- 2022-02-28 CN CN202210190787.7A patent/CN114510207B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055294A (en) * | 2016-05-23 | 2016-10-26 | 福州瑞芯微电子股份有限公司 | Layer composition optimization method and apparatus |
CN106874017A (en) * | 2017-03-10 | 2017-06-20 | 广东欧珀移动通信有限公司 | A kind of display scene recognition method of mobile terminal, device and mobile terminal |
CN108153505A (en) * | 2017-12-26 | 2018-06-12 | 掌阅科技股份有限公司 | Display methods, electronic equipment and the computer storage media of handwriting input content |
CN110018759A (en) * | 2019-04-10 | 2019-07-16 | Oppo广东移动通信有限公司 | Interface display method, device, terminal and storage medium |
CN110363831A (en) * | 2019-07-17 | 2019-10-22 | Oppo广东移动通信有限公司 | Layer composition, device, electronic equipment and storage medium |
CN110377264A (en) * | 2019-07-17 | 2019-10-25 | Oppo广东移动通信有限公司 | Layer composition, device, electronic equipment and storage medium |
CN112767231A (en) * | 2021-04-02 | 2021-05-07 | 荣耀终端有限公司 | Layer composition method and device |
CN113625983A (en) * | 2021-08-10 | 2021-11-09 | Oppo广东移动通信有限公司 | Image display method, image display device, computer equipment and storage medium |
CN113986162A (en) * | 2021-09-22 | 2022-01-28 | 荣耀终端有限公司 | Layer composition method, device and computer readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024114322A1 (en) * | 2022-11-30 | 2024-06-06 | 腾讯科技(深圳)有限公司 | Picture rendering method and apparatus, device, storage medium, and program product |
CN118227069A (en) * | 2024-05-23 | 2024-06-21 | 鼎道智芯(上海)半导体有限公司 | Display control method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114510207B (en) | 2024-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108984137B (en) | Double-screen display method and system and computer readable storage medium | |
CN114510207B (en) | Layer synthesis method, device, equipment, medium and program product | |
US11934733B2 (en) | Vehicle control device, vehicle display system, and vehicle display control method | |
CN110641382B (en) | Vehicle-mounted interface display method and device, electronic equipment and storage medium | |
JP2003233809A (en) | Image composition device and method | |
CN111882480B (en) | Method, device, system and storage medium for processing partitioned data | |
CN109889877A (en) | Car multi-screen display control method and device | |
CN111260746A (en) | Backing image processing method, electronic device and storage medium | |
CN107908455B (en) | Browser page switching method and system | |
JP2005115107A (en) | Display processing apparatus, navigation system, program, and display processing method | |
CN113348436B (en) | Display control system and method, display device and method, mobile body, and recording medium | |
CN116527978A (en) | Multi-screen interaction control method and device | |
JP2007170834A (en) | Navigation apparatus and image display method for the navigation apparatus | |
CN111785229A (en) | Display method, device and system | |
CN117153118B (en) | Picture updating method, device and equipment of ink screen and storage medium | |
JP2016187079A (en) | Semiconductor device, display system, and display method | |
CN114816306A (en) | Screen sharing control method and device, electronic equipment and storage medium | |
CN117093361B (en) | Method and system for rapidly recovering automobile instrument abnormality | |
CN108377352A (en) | Method for processing video frequency and device, computer installation and storage medium | |
CN116416359A (en) | Multi-path image parallel rendering method, device, computer equipment and storage medium | |
CN116414478A (en) | Image synthesis method and device and electronic equipment | |
CN115827073A (en) | Independent display card and method, equipment and storage medium for processing simultaneous display of integrated display | |
CN118069275A (en) | Display method, device, equipment, medium and product of card and application | |
CN117998057A (en) | Video display control method and device, vehicle-mounted equipment and readable storage medium | |
CN118134770A (en) | Scene rendering method, electronic device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |