CN111625311B - Control method, control device, electronic equipment and storage medium - Google Patents

Control method, control device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111625311B
CN111625311B CN202010417858.3A CN202010417858A CN111625311B CN 111625311 B CN111625311 B CN 111625311B CN 202010417858 A CN202010417858 A CN 202010417858A CN 111625311 B CN111625311 B CN 111625311B
Authority
CN
China
Prior art keywords
screen
rgb data
thread
sub
full
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
CN202010417858.3A
Other languages
Chinese (zh)
Other versions
CN111625311A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010417858.3A priority Critical patent/CN111625311B/en
Publication of CN111625311A publication Critical patent/CN111625311A/en
Application granted granted Critical
Publication of CN111625311B publication Critical patent/CN111625311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Digital Computer Display Output (AREA)

Abstract

The application discloses a control method, a control device, an electronic device and a storage medium. The control method comprises the following steps: intercepting and storing RGB data of a first full screen after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area, sending the RGB data of the first screen area to the first sub-thread, and sending the RGB data of a second screen area to a second sub-thread after receiving a second screen capturing message sent by the second sub-thread before receiving a layer composition message, and the second screen capturing message comprises a request for reading RGB data of the second screen area. According to the control method, only one screen capturing is executed when the task of capturing the screen for many times appears between two adjacent layers is realized, the phenomenon that the screen is blocked due to the fact that the screen captures the screen for many times in one refreshing period is avoided, and the user experience is improved.

Description

Control method, control device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a control method, a control device, an electronic apparatus, and a computer readable storage medium.
Background
In the related art, the electronic device may have many programs to read color data of a specific area of the screen, for example, the under-screen light sensation needs to read color data of a corresponding area to perform color compensation, or the user interface adaptation program needs to read color data of a different area of the user interface to perform color adaptation. These screen capture actions may be initiated by the respective program (or sub-thread) and performed as tasks after the task of layer composition (generating the display content of the screen) is performed on the main thread (SurfaceFlinger, SF). However, as the functions of the electronic device are more and more abundant, the task of screen capturing may be more and longer; on the other hand, the refreshing frequency of the screen is higher and higher, the task and layer composition of multiple screen capturing can not be completed in one refreshing period of the screen, and the phenomenon of display blocking caused by frame dropping is easy to occur, so that the user experience is affected.
Disclosure of Invention
In view of this, embodiments of the present application provide a control method, a control apparatus, a mobile terminal, and a computer-readable storage medium.
The application also provides a control method, which comprises the following steps:
intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data;
transmitting RGB data of the first screen area to the first sub-thread; and
and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
The application provides a control method, which comprises the following steps:
intercepting and storing full-screen RGB data after receiving first screen capturing information between two adjacent layers of laminated information;
and sending the corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for sending any subsequent screen capturing information between the first screen capturing information and the two-time image layer composition message.
The application also provides a control device, the control device includes:
the second processing module is used for intercepting and storing full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, and the first screen capturing message comprises a request for reading RGB data of a first screen area;
the second sending module is used for sending the RGB data of the first screen area to the first sub-thread; and
and the third sending module is used for sending RGB data of a second screen area to the second sub-thread after receiving a second screen capturing message sent by the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
The application also provides a control device, the control device includes:
the first processing module is used for intercepting and storing full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, and the first screen capturing message comprises a request for reading RGB data of a first screen area; and
and the first sending module is used for sending the RGB data of the first screen area to the first sub-thread.
The application provides an electronic device comprising a processor configured to:
intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data;
transmitting RGB data of the first screen area to the first sub-thread; and
and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
The application provides an electronic device comprising a processor configured to:
intercepting and storing full-screen RGB data after receiving first screen capturing information between two adjacent layers of laminated information;
and sending the corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for sending any subsequent screen capturing information between the first screen capturing information and the two-time image layer composition message.
An electronic device includes one or more processors, a memory; and
one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the control method of any of the above. The control method comprises the following steps: intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data; transmitting RGB data of the first screen area to the first sub-thread; and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area. The control method further includes: and after receiving the first screen capturing information between two adjacent image layer synthesizing messages, intercepting and storing full-screen RGB data, and sending the corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for sending any subsequent screen capturing information between the first screen capturing information and the two image layer synthesizing messages.
One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the control method are provided. The control method comprises the following steps: intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data; transmitting RGB data of the first screen area to the first sub-thread; and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area. The control method further includes: and after receiving the first screen capturing information between two adjacent image layer synthesizing messages, intercepting and storing full-screen RGB data, and sending the corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for sending any subsequent screen capturing information between the first screen capturing information and the two image layer synthesizing messages.
In the control method, the control device, the electronic equipment and the computer readable storage medium, after the screen capturing information of the first sub-thread is received, the full screen is captured, the full screen RGB data is stored, the RGB data of the first screen area in the full screen RGB data is sent to the first sub-thread, when the second sub-thread needs to acquire the RGB data of the second screen area, the RGB data of the second area in the stored full screen RGB data is sent to the second sub-thread, and the screen capturing is not needed again, namely, even if the screen capturing task is carried out for a plurality of times, the screen capturing task can be executed only once, the phenomenon that the screen is blocked due to frame dropping caused by the fact that the screen capturing is carried out for a plurality of times in one refreshing period is avoided, and the user experience is improved.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a control method according to certain embodiments of the present application.
Fig. 2 is a block diagram of a control device according to some embodiments of the present application.
Fig. 3 is a block diagram of an electronic device according to some embodiments of the present application.
Fig. 4 is a further block diagram of an electronic device according to some embodiments of the present application.
FIG. 5 is a schematic diagram of a connection of a processor and a computer-readable storage medium of certain embodiments of the present application.
FIG. 6 is a schematic diagram of layer composition according to certain embodiments of the present application.
FIG. 7 is a schematic illustration of a control method according to certain embodiments of the present application.
FIG. 8 is a schematic illustration of a control method according to certain embodiments of the present application.
Fig. 9 is a flow chart of a control method of certain embodiments of the present application.
FIG. 10 is a flow chart of a control method of certain embodiments of the present application.
FIG. 11 is a flow chart of a control method of certain embodiments of the present application.
Fig. 12 is a block diagram of a control device according to some embodiments of the present application.
Fig. 13 is a further flow diagram of a control method of certain embodiments of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or an implicit indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless specifically defined otherwise.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; may be mechanically connected, may be electrically connected, or may be in communication with each other; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
The following disclosure provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present application. Furthermore, the present application may repeat reference numerals and/or letters in the various examples, which are for the purpose of brevity and clarity, and which do not in themselves indicate the relationship between the various embodiments and/or arrangements discussed.
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the related art, there may be many procedures for the electronic device to read color data of a specific area of the screen, for example, the light sensing element needs to obtain the light intensity transmitted through the screen, and the display screen 30 can affect the light intensity transmitted through the screen when displaying different pictures, so the light sensing element needs to read the color data of the light sensing placement area under the screen in the screen to compensate the light intensity. Alternatively, the user interface adaptation program may need to read color data of different areas of the user interface for color adaptation. For example, in some examples, the user interface adaptation program is configured to read color data for the location of the navigation bar area in the screen to adjust the navigation bar color to distinguish it from the desktop wallpaper color for the location of the navigation bar area in order to avoid inconvenience in use due to the navigation bar being similar to the desktop wallpaper color in the user interface.
Reading color data of a particular area of the screen requires screen capturing, which may be initiated by a respective program (or sub-thread) and performed (SurfaceFlinger, SF) by the main thread after the task of layer composition (generating the display content of the screen) is performed. However, as the functions of the electronic device are more and more abundant, the task of screen capturing may be more and longer; on the other hand, the refreshing frequency of the screen is higher and higher, the task and layer composition of multiple screen capturing can not be completed in one refreshing period of the screen, and the phenomenon of display blocking caused by frame dropping is easy to occur, so that the user experience is affected.
Referring to fig. 1, the present application provides a control method, which includes the steps of:
s12: intercepting and storing RGB data of a first full screen after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading the RGB data of a first screen area;
s14: transmitting RGB data of the first screen area to a first sub-thread; and
s16: and before receiving the graphic composition message, if a second screen capturing message sent by a second sub-thread is received, sending RGB data of a second screen area to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
Referring further to fig. 2, a control apparatus 10 is provided in an embodiment of the present application. The control device 10 comprises a first processing module 12, a first transmitting module 14 and a second transmitting module 16.
Step S12 may be implemented by the first processing module 12, step S14 may be implemented by the first transmitting module 14, and step S16 may be implemented by the second transmitting module 16. Alternatively, the first processing module 12 may be configured to intercept and store the first full screen RGB data after receiving the first screen capture message sent by the first sub-thread, where the first screen capture message includes a request to read the RGB data of the first screen region.
The first sending module 14 may be configured to send RGB data of the first screen area to the first sub-thread.
The second sending module 16 may be configured to send the RGB data of the second screen area to the second sub-thread after receiving the second screen capture message sent by the second sub-thread before receiving the layer composition message, where the second screen capture message includes a request for reading the RGB data of the second screen area.
Referring to fig. 3, an electronic device 1 is provided in an embodiment of the present application, and a control method of the present application may be completed by the electronic device 1. The electronic device 1 comprises a processor 20.
The processor 20 may be configured to intercept and save the first full screen RGB data after receiving a first screen capture message sent by the first sub-thread, the first screen capture message including a request to read the first screen region RGB data. The processor 20 may also send the RGB data of the first screen area to the first sub-thread and send the RGB data of the second screen area to the second sub-thread after receiving a second screen capture message sent by the second sub-thread before receiving the layer composition message, the second screen capture message including a request to read the RGB data of the second screen area.
Referring to fig. 4, the present application provides an electronic device 1 including one or more processors 20, a memory 40; and one or more programs 42, wherein the one or more programs 42 are stored in the memory 40 and executed by the one or more processors 20, the programs 42 being executed by the processor 20 with instructions of the control method.
Referring to fig. 5, the present application provides one or more non-transitory computer-readable storage media 50 containing computer-executable instructions that, when executed by one or more processors 20, cause the processors 20 to perform a control method.
In the control method, the control device 10, the electronic device 1 and the computer readable storage medium 50 of these embodiments, after receiving the screen capturing message of the first sub-thread, the full screen and the full screen RGB data are captured, and the RGB data of the first screen area in the full screen RGB data are sent to the first sub-thread, if the second sub-thread needs to obtain the RGB data of the second screen area, only the RGB data of the second area in the stored full screen RGB data need to be sent to the second sub-thread, and the screen capturing is not needed again, that is, even if the screen capturing task is performed for multiple times, the screen capturing task can be executed only once, so that the phenomenon of blocking caused by frame dropping caused by multiple screen capturing in one refresh period of the screen is avoided, and the user experience is improved.
In some embodiments, the electronic device 1 may be a cell phone, a tablet computer, a smart wearable device (smart watch, smart bracelet, smart helmet, smart glasses, etc.), a virtual reality device or a head display device.
The present embodiment is described taking the electronic device 1 as an example of a mobile phone, that is, the control method and the control apparatus 10 are applied to, but not limited to, a mobile phone. The control device 10 may be hardware or software preinstalled on the mobile phone and may perform the control method when starting up the operation on the mobile phone. For example, the control device 10 may be an underlying software code segment of a cell phone or part of an operating system. Thus, when a plurality of application programs (APP) are installed on the mobile phone and the plurality of application programs attempt to capture the screen in one refresh cycle to obtain the corresponding RGB data, the screen capture task is performed only once.
In some embodiments, the control device 10 may be part of the electronic apparatus 1. Alternatively, the electronic device 1 comprises a control means 10.
In some embodiments, the control device 10 may be a discrete component assembled in a manner to have the aforementioned functions, or a chip in the form of an integrated circuit having the aforementioned functions, or a computer software code segment that when run on a computer causes the computer to have the aforementioned functions.
In some embodiments, the control device 10 may be attached to a computer or computer system as hardware, either separately or as an additional peripheral component. The control device 10 may also be integrated into a computer or computer system, e.g. the control device 10 may be integrated into the processor 20 when the control device 10 is part of the electronic apparatus 1.
In some embodiments in which the control device 10 is part of the electronic apparatus 1, the code segments corresponding to the control device 10 may be stored as software on the memory 40 and executed on the processor 20 to perform the functions described above. Or the control device 10 includes one or more of the programs described above, or the one or more programs described above includes the control device 10.
In some embodiments, the computer readable storage medium 50 may be a storage medium built in the electronic device 1, for example, may be the memory 40, or may be a storage medium that is removably plugged into the electronic device 1, for example, an SD card.
One skilled in the relevant art will appreciate that surfeflinger is an integral part of android multimedia (Android multimedia), which is a service in the android system. SurfaceFlinger is a thread class that starts a SurfaceFlinger snoop thread, or SurfaceFlinger main thread, when creating the SurfaceFlinger service.
With reference to fig. 6, the surfaceflinger main thread can receive graphic display data from multiple sources, or layer composition messages, and perform layer composition to generate a display. For example, in some examples, the surfeflinger main thread receives display data for status bars, display data for navigation bars, display data for wallpaper, and display data for initiator icon layers. The SurfaceFlinger main thread synthesizes the display data in a layer to generate a display interface.
In addition, (SurfaceFlinger, SF) the main thread can also receive a screen capture message sent by a program (or sub-thread) in the electronic device 1, and (SurfaceFlinger, SF) the main thread can execute the screen capture message after the layer composition is executed.
In this application, the sub-thread refers only to each program running in the electronic device 1, and is not a sub-thread in the surfeflinger main thread. It will be appreciated that the sub-threads may comprise a plurality of sub-threads, one for each program.
It should be further noted that, the electronic device 1 includes a display screen 30, the display screen 30 is connected to the processor 20, and the surfeflinger main thread sends the display screen 30 to display the completed display screen after performing the layer composition. The surfeflinger main thread executes the screen capture message to capture the display screen 30.
Full screen refers to all of the displayed pictures in the display screen 30, and screen area refers to part or all of the area in full screen. The full-screen RGB data refers to all RGB data of all display screens of the display screen 30, and the RGB data of the first screen region refers to RGB data within a designated region of all display screens of the display screen 30.
In this application, the surfeflinger main thread may be disposed within the processor 20. The processor 20 performs layer composition and screen shots through the surfeflinger main thread.
Referring to fig. 7, the surfaceflinger main thread executes corresponding message tasks successively according to the sequence of received messages. In general, the surfeflinger main thread can receive the layer composition message at every interval of one vertical synchronization (vsync) period, complete the layer composition within the vertical synchronization period to generate a display screen, and send the display screen 30 for display. If the surfeflinger main thread receives the screen capture message, the surfeflinger main thread needs to complete executing the screen capture according to the screen capture message before receiving the layer composition message, that is, the surfeflinger main thread needs to complete executing each layer composition message and executing the adjacent screen capture message of each layer composition message in one vertical synchronization period.
However, the vertical synchronization period is inversely related to the refresh rate of the display screen 30, and is shorter if the refresh rate of the display screen 30 is higher. In this application, the vertical synchronization period may be synchronized with the refresh period of the display screen 30. For example, if the refresh rate of the display screen 30 is 60 hertz, i.e., the refresh period of the display screen 30 is 1/60 seconds, the vertical synchronization period is 1/60 seconds, and if the refresh rate of the display screen 30 is 90 hertz, the vertical synchronization period is 1/90 seconds. The refresh rate of the display screen 30 refers to the number of refreshes per second of the display screen 30, for example, the refresh rate of the display screen 30 is 60 hertz, i.e., the screen is refreshed 60 times in 1 second, every 1/60 second interval. If multiple screen capturing messages occur in one vertical synchronization period, the SurfaceFlinger main thread executes corresponding message tasks successively according to the sequence of the received messages, which may cause that the SurfaceFlinger main thread Cheng Zhihang cannot execute the screen capturing message as expected, and further cause that the SurfaceFlinger main thread cannot send the display screen generated by synthesizing the layers to the display screen 30 for displaying, so that the display screen 30 displays a blocking phenomenon, and the user experience is affected. Thus, in this application, if the surfeflinger main thread receives multiple screen capture messages in one vertical synchronization period, only one screen capture message is executed.
Specifically, referring to fig. 8, after the first sub-thread generates the first screen capturing message, the first sub-thread sends the first screen capturing message to the processor 20, after the processor 20 receives the first screen capturing message of the first sub-thread, if the SurfaceFlinger main thread is executing the layer composition, the SurfaceFlinger main thread starts to execute the first screen capturing message after completing the first layer composition, if the SurfaceFlinger main thread is not executing the layer composition, the SurfaceFlinger main thread executes the first screen capturing message, so that the SurfaceFlinger main thread intercepts the first full screen displayed in the display screen 30, and saves the RGB data of the first full screen. Further, the processor 20 intercepts RGB data of a corresponding first screen area in the first full screen of the surfeflinger main line Cheng Jiequ according to the first screen capturing message of the first sub-thread, and sends the RGB data to the first sub-thread.
The layer composition message refers to a layer composition message adjacent to the first screen capture message, which is received by the surfeflinger main thread after receiving the first screen capture message. Alternatively, the layer composition message refers to a layer composition message that is not within the same vertical synchronization period as the first screen capture message.
Further, if the second sub-thread generates the second screenshot message and sends the second screenshot message to the processor 20, after receiving the second screenshot message sent by the second sub-thread, the processor 20 does not perform screenshot by the SurfaceFlinger main thread in the processor 20, intercepts RGB data of a corresponding second screen area in the first full screen according to the first screenshot message of the first sub-thread in the first full screen of the SurfaceFlinger main line Cheng Jiequ, and sends the RGB data to the second sub-thread.
The second screen shot message refers to any screen shot message received after the first screen shot message and within the same vertical synchronization period as the first screen shot message. The second sub-thread refers to a sub-thread generating the screen capture message after the first screen capture message, and the first sub-thread and the second sub-thread can be the same sub-thread or different sub-threads.
In this way, the surfeflinger main thread is ensured to execute the screen capturing message only once in one vertical synchronization period, so that the phenomenon that the screen 30 drops frames and is blocked due to the fact that the surfeflinger main thread executes the screen capturing for a plurality of times in one vertical synchronization period is avoided.
Referring to fig. 9, in some embodiments, the control method further includes:
s18: and if the third screen capturing message sent by the third sub-thread is received after the layer composition message is received, the second full screen is captured, and the third screen capturing message comprises a request for reading RGB data of a third screen area in RGB data of the second full screen.
S20: comparing the difference degree of the RGB data of the first full screen and the RGB data of the second full screen;
s22: if the difference between the RGB data of the first full screen and the RGB data of the second full screen is smaller than or equal to a first preset value, sending the RGB data of a third screen area in the RGB data of the first full screen to a third sub-thread;
s24: if the RGB data of the first full screen and the RGB data of the second full screen are larger than a first preset value, the RGB data of the second full screen is saved, and the RGB data of a third screen area in the RGB data of the second full screen is sent to a third sub-thread.
Referring further to fig. 2, in some embodiments, the control device 10 further includes a comparison module 18. Step S18 may be implemented by the first processing module 12, step S20 may be implemented by the comparing module 18, step S22 may be implemented by the first transmitting module 14, and step S24 may be implemented by the second transmitting module 16.
Alternatively, the first processing module 12 may be configured to intercept and store the RGB data of the second full screen after receiving the third screen capturing message sent by the third sub-thread after receiving the layer composition message, where the third screen capturing message includes a request for reading the RGB data of the third screen area in the RGB data of the second full screen.
The comparison module 18 may be used to compare the degree of difference of the first full screen RGB data and the second full screen RGB data.
The first sending module 14 may be configured to send RGB data of the first screen area to the first sub-thread.
The second sending module 16 may be configured to store the RGB data of the second full screen and send the RGB data of the third screen area in the RGB data of the second full screen to the third sub-thread if the RGB data of the first full screen and the RGB data of the second full screen are greater than the first predetermined value.
In some embodiments, the processor 20 may be configured to intercept and store the RGB data of the second full screen if a third screen capture message sent by a third sub-thread is received after the layer composition message is received, where the third screen capture message includes a request to read the RGB data of a third screen region in the RGB data of the second full screen. The processor 20 may also be used to compare the degree of difference of the first full screen RGB data and the second full screen RGB data. The processor 20 may be further configured to send the RGB data of the first screen area to the first sub-thread and if the RGB data of the first full screen and the RGB data of the second full screen are greater than a first predetermined value, save the RGB data of the second full screen and send the RGB data of the third screen area in the RGB data of the second full screen to the third sub-thread.
The third screenshot message refers to a screenshot message that the processor 20 first receives in any vertical synchronization period after receiving the second screenshot message. The first predetermined value is a value preset in the processor 20.
It will be appreciated that if the processor 20 receives the second screenshot message and then receives the layer composition message, the surfeflinger main thread performs layer composition according to the layer composition message to finally generate a display screen and sends the display screen to the display screen 30, and the display screen 30 may display the display screen generated by the surfeflinger main thread. It will be appreciated that, typically, the surfeflinger main thread will execute a layer composition to generate a display from the layer composition message every vertical synchronization period. And the vertical synchronization period is short, so that the display screen 30 may display that the display screen generated by the surfeflinger main thread is slightly different from the first full screen intercepted by the surfeflinger main thread according to the first sub-thread. Therefore, if the display screen 30 displays that the display screen generated by the surfeflinger main thread may have a small difference from the first full screen captured by the surfeflinger main thread according to the first sub-thread, the processor 20 may capture RGB data of the third screen area corresponding to the third screen capturing message from the stored RGB data of the first full screen and send the RGB data to the third sub-thread.
Specifically, if the processor 20 receives the third screen capturing information generated by the third sub-thread after receiving the layer composition message, the processor controls the surfeflinger main thread to capture all the display screens of the display screen 30 according to the third screen capturing information to generate the second full screen after completing the layer composition to generate the display screen and sending the display screen to the display screen 30.
Further, the processor 20 compares the difference between the RGB data of the second full screen and the RGB data of the first full screen, if the difference between the RGB data of the second full screen and the RGB data of the first full screen is less than or equal to the first predetermined value, it indicates that the second full screen is close to the first full screen, and the processor 20 intercepts the RGB data of the third screen area in the first full screen to the corresponding third sub-thread. If the difference between the RGB data of the second full screen and the RGB data of the first full screen is larger than a first preset value, the RGB data of the second full screen is stored, the RGB data of a third screen area in the second full screen is intercepted according to a third screenshot message, and the RGB data is sent to a third sub-thread corresponding to the third screenshot message.
Referring to fig. 10, in some embodiments, S14 includes the steps of:
s142: and reading RGB data of a first screen area in the RGB data of the first full screen according to the first screen capturing message and sending the RGB data to the first sub-thread.
In some embodiments, S142 may be implemented by the first sending module 14, or the first sending module 14 may be configured to read RGB data of the first screen area in the first full-screen RGB data according to the first screen capturing message and send the RGB data to the first sub-thread.
In some embodiments, the processor 20 is configured to read RGB data of a first screen area in the RGB data of the first full screen according to the first screen capture message and send the RGB data to the first sub-thread.
Referring to fig. 11, the present application further provides a control method, where the control method includes the steps of:
s30: and intercepting and storing full-screen RGB data after receiving the first screen capturing information between two adjacent layers of laminated messages.
S32: and sending the corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for sending any subsequent screen capturing information between the first screen capturing information and the two-time image layer composition message.
Referring to fig. 12, the control device 10 of the present application further includes a second processing module 30 and a third sending module 32, where step S30 may be completed by the second processing module 30, and step S32 may be completed by the third sending module 32.
Alternatively, the second processing module 30 may be configured to intercept and store full screen RGB data after receiving the first screenshot information between two adjacent layers of the composition message.
The third sending module 32 may be configured to send the corresponding regional RGB data in the full-screen RGB data to a corresponding sub-thread that sends any subsequent screen capturing information between the first screen capturing information and the two-layer composition message.
In some embodiments, the processor 20 is configured to intercept and save full screen RGB data after receiving the first screenshot information between two adjacent layers of the composition message. The processor 20 is further configured to send the corresponding regional RGB data in the full-screen RGB data to a corresponding sub-thread that sends any subsequent screen capture information between the first screen capture information and the two-layer composition message.
As such, if there are multiple screen capture messages within two adjacent layer composition messages, the processor 20 intercepts and saves full screen RGB data from the first screen capture message. And the regional RGB data corresponding to each screen capturing message in the full screen RGB is sent to the sub-thread corresponding to each screen capturing message, so that the task of capturing the screen for multiple times between two adjacent layers is realized, and the screen can be executed only once, and the phenomenon of display blocking caused by frame dropping due to multiple screen capturing in one refreshing period of the screen is avoided, and the user experience is influenced.
Referring to fig. 13, in some embodiments, the control method further includes the steps of:
s34: performing two-time layer synthesis according to the adjacent two-time layer synthesis message;
s36: judging whether the difference degree between the images synthesized by the two layers is smaller than a preset value or not;
s38: and when the difference degree is smaller than a preset value, sending the corresponding regional RGB data in the full-screen RGB data to a sub-thread corresponding to the screen capturing message after the next layer is formed into the message.
Referring further to fig. 12, in some embodiments, the control device 10 further includes a synthesizing module 34, a judging module 36, and a fourth transmitting module 38. Step S34 may be implemented by the synthesizing module 34, step S34 may be implemented by the judging module 36, and step S38 may be implemented by the fourth transmitting module 38. Alternatively, the composition module 34 may be configured to perform two-layer composition based on two adjacent-layer composition messages. The determining module 36 may be configured to determine whether a degree of difference between the two images after layer synthesis is less than a predetermined value. The fourth sending module 38 may be configured to send the corresponding region RGB data in the full-screen RGB data to the sub-thread corresponding to sending the screen capture message after the next layer is formed into the message when the difference is less than the predetermined value.
In some embodiments, the processor 20 is further configured to perform two-time layer composition according to the adjacent two-time layer composition message, and the processor 20 is further configured to determine whether a difference between the images after the two-time layer composition is less than a predetermined value and send the corresponding region RGB data in the full-screen RGB data to the sub-thread corresponding to the screen capture message after the next layer composition message when the difference is less than the predetermined value.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A control method for an electronic device, the control method comprising:
intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data;
transmitting RGB data of the first screen area to the first sub-thread; and
and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
2. The control method according to claim 1, characterized in that the control method further comprises:
intercepting a second full screen after receiving a third screen capturing message sent by a third sub-thread after receiving a layer composition message, wherein the third screen capturing message comprises a request for reading RGB data of a third screen area in RGB data of the second full screen;
comparing the difference degree of the RGB data of the first full screen and the RGB data of the second full screen;
if the difference between the RGB data of the first full screen and the RGB data of the second full screen is smaller than or equal to a first preset value, sending the RGB data of the third screen area in the RGB data of the first full screen to the third sub-thread;
if the difference between the RGB data of the first full screen and the RGB data of the second full screen is larger than the first preset value, storing the RGB data of the second full screen and sending the RGB data of the third screen area in the RGB data of the second full screen to the third sub-thread.
3. The control method of claim 1, wherein the sending RGB data for the first screen region to the first sub-thread comprises:
and reading the RGB data of the first screen area in the RGB data of the first full screen according to the first screen capturing message and sending the RGB data to the first sub-thread.
4. A control method for an electronic device, the control method comprising:
intercepting and storing full-screen RGB data after receiving first screen capturing information between two adjacent layers of laminated information;
transmitting corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for transmitting any subsequent screen capturing information between the first screen capturing information and the two-time image layer composition message;
performing two-time layer synthesis according to the adjacent two-time layer synthesis message;
judging whether the difference degree between the images synthesized by the two layers is smaller than a preset value or not;
and when the difference degree is smaller than the preset value, sending the corresponding regional RGB data in the full-screen RGB data to a sub-thread corresponding to the screen capturing message after the next layer is formed into the message.
5. A control device, characterized in that the control device comprises:
the first processing module is used for intercepting and storing full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, and the first screen capturing message comprises a request for reading RGB data of a first screen area;
the first sending module is used for sending RGB data of the first screen area to the first sub-thread; and
and the second sending module is used for sending RGB data of a second screen area to the second sub-thread after receiving a second screen capturing message sent by the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
6. A control device, characterized in that the control device comprises:
the second processing module is used for intercepting and storing full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, and the first screen capturing message comprises a request for reading RGB data of a first screen area; and
the third sending module is used for sending RGB data of the first screen area to the first sub-thread;
the synthesis module is used for carrying out twice layer synthesis according to the adjacent twice layer synthesis information;
the judging module is used for judging whether the difference degree between the images synthesized by the two layers is smaller than a preset value;
and the fourth sending module is used for sending the corresponding region RGB data in the full-screen RGB data to the sub-thread corresponding to the screen capturing message after the next graph layer is formed into the message when the difference degree is smaller than the preset value.
7. An electronic device, the electronic device comprising a processor configured to:
intercepting and storing full-screen RGB data after receiving first screen capturing information between two adjacent layers of laminated information;
transmitting corresponding region RGB data in the full-screen RGB data to a corresponding sub-thread for transmitting any subsequent screen capturing information between the first screen capturing information and the two-time image layer composition message;
performing two-time layer synthesis according to the adjacent two-time layer synthesis message;
judging whether the difference degree between the images synthesized by the two layers is smaller than a preset value or not;
and when the difference degree is smaller than the preset value, sending the corresponding regional RGB data in the full-screen RGB data to a sub-thread corresponding to the screen capturing message after the next layer is formed into the message.
8. An electronic device, the electronic device comprising a processor configured to:
intercepting and storing first full-screen RGB data after receiving a first screen capturing message sent by a first sub-thread, wherein the first screen capturing message comprises a request for reading RGB data of a first screen area in the first full-screen RGB data;
transmitting RGB data of the first screen area to the first sub-thread; and
and if a second screen capturing message sent by a second sub-thread is received before the layer composition message is received, sending RGB data of a second screen area in the RGB data of the first full screen to the second sub-thread, wherein the second screen capturing message comprises a request for reading the RGB data of the second screen area.
9. An electronic device comprising one or more processors, memory; and
one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the control method of any of claims 1-3 and claim 4.
10. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the control method of any of claims 1-3 and 4.
CN202010417858.3A 2020-05-18 2020-05-18 Control method, control device, electronic equipment and storage medium Active CN111625311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010417858.3A CN111625311B (en) 2020-05-18 2020-05-18 Control method, control device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010417858.3A CN111625311B (en) 2020-05-18 2020-05-18 Control method, control device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111625311A CN111625311A (en) 2020-09-04
CN111625311B true CN111625311B (en) 2023-05-26

Family

ID=72259867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010417858.3A Active CN111625311B (en) 2020-05-18 2020-05-18 Control method, control device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111625311B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248946A (en) * 2012-02-03 2013-08-14 海尔集团公司 Method and system for rapidly transmitting video image
WO2016173350A1 (en) * 2015-04-29 2016-11-03 腾讯科技(深圳)有限公司 Picture processing method and device
WO2017143855A1 (en) * 2016-02-26 2017-08-31 努比亚技术有限公司 Device with screen capturing function and screen capturing method
CN107395692A (en) * 2017-07-04 2017-11-24 广州云测信息技术有限公司 Terminal screen methods of exhibiting and device
CN107580131A (en) * 2017-09-04 2018-01-12 维沃移动通信有限公司 Image processing method and mobile terminal
CN107728988A (en) * 2017-10-12 2018-02-23 青岛海信移动通信技术股份有限公司 Content display method and device for ink screen
CN108052263A (en) * 2017-12-28 2018-05-18 广东小天才科技有限公司 Screen capturing method based on terminal equipment and terminal equipment
CN110737386A (en) * 2019-09-06 2020-01-31 华为技术有限公司 screen capturing method and related equipment
CN110795097A (en) * 2019-11-04 2020-02-14 腾讯科技(深圳)有限公司 Page processing method and device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248946A (en) * 2012-02-03 2013-08-14 海尔集团公司 Method and system for rapidly transmitting video image
WO2016173350A1 (en) * 2015-04-29 2016-11-03 腾讯科技(深圳)有限公司 Picture processing method and device
WO2017143855A1 (en) * 2016-02-26 2017-08-31 努比亚技术有限公司 Device with screen capturing function and screen capturing method
CN107395692A (en) * 2017-07-04 2017-11-24 广州云测信息技术有限公司 Terminal screen methods of exhibiting and device
CN107580131A (en) * 2017-09-04 2018-01-12 维沃移动通信有限公司 Image processing method and mobile terminal
CN107728988A (en) * 2017-10-12 2018-02-23 青岛海信移动通信技术股份有限公司 Content display method and device for ink screen
CN108052263A (en) * 2017-12-28 2018-05-18 广东小天才科技有限公司 Screen capturing method based on terminal equipment and terminal equipment
CN110737386A (en) * 2019-09-06 2020-01-31 华为技术有限公司 screen capturing method and related equipment
CN110795097A (en) * 2019-11-04 2020-02-14 腾讯科技(深圳)有限公司 Page processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111625311A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN113225427B (en) Image display method and terminal equipment
TWI534795B (en) Techniques for aligning frame data
US20160086585A1 (en) Image display program, image display method, and image display system
CN114648951B (en) Method for controlling dynamic change of screen refresh rate and electronic equipment
CN110795056B (en) Method, device, terminal and storage medium for adjusting display parameters
US10834424B2 (en) Method and device for compressing image, and electronic device
CN113766324B (en) Video playing control method and device, computer equipment and storage medium
CN109005283A (en) Show method, apparatus, terminal and the storage medium of notification message
CN105408838A (en) Dynamic GPU feature adjustment based on user-observed screen area
CN112532896A (en) Video production method, video production device, electronic device and storage medium
KR20150081765A (en) Outputting Method For Screen data And Electronic Device supporting the same
CN111951206A (en) Image synthesis method, image synthesis device and terminal equipment
US20240221125A1 (en) Image processing method, device, and storage medium
CN112511816A (en) Video delay test system, method, device, equipment and storage medium
CN111625311B (en) Control method, control device, electronic equipment and storage medium
CN113110817B (en) Method, device, terminal and storage medium for determining ambient light brightness
US11513937B2 (en) Method and device of displaying video comments, computing device, and readable storage medium
CN109783043A (en) A kind of method, apparatus that display frequency is shown and display
CN106095744B (en) Irregular control icons processing unit and method
CN115151886A (en) Delaying DSI clock changes based on frame updates to provide a smoother user interface experience
CN115129279B (en) Image drawing method, image drawing device, electronic equipment and computer storage medium
CN116527978A (en) Multi-screen interaction control method and device
CN114153414A (en) Image anti-tearing method and related device
CN115691387A (en) Method for adjusting refresh frequency of display screen and electronic equipment
CN109726027B (en) Message viewing method and device and electronic equipment

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