CN113050865A - Control method and device - Google Patents
Control method and device Download PDFInfo
- Publication number
- CN113050865A CN113050865A CN202110341029.6A CN202110341029A CN113050865A CN 113050865 A CN113050865 A CN 113050865A CN 202110341029 A CN202110341029 A CN 202110341029A CN 113050865 A CN113050865 A CN 113050865A
- Authority
- CN
- China
- Prior art keywords
- picture
- refreshing
- reaction
- event
- picture data
- 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
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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The application provides a control method and a control device, which comprise the following steps: obtaining a pressing event of an operation body; the method comprises the steps of determining a picture refreshing mechanism currently used by the electronic equipment based on a press event, responding to the press event, obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on the picture refreshing mechanism corresponding to the press event, the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the picture refreshing mechanism currently used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, the electronic equipment can control the display refreshing of the reaction picture based on the two refreshing mechanisms in the operation process, the first refreshing mechanism or the second refreshing mechanism is selected by utilizing the press event, and therefore the corresponding press event can be triggered as required and the personalized picture refreshing requirement is met. And the speed of the reaction picture obtained based on the first refreshing mechanism is superior to that of the reaction picture obtained based on the second refreshing mechanism, and the refreshing efficiency of the reaction picture can be improved by utilizing the first refreshing mechanism.
Description
Technical Field
The present application belongs to the technical field of device control, and in particular, to a control method and apparatus.
Background
With the rapid development of display technology, the requirement for screen refreshing is higher and higher, for example, for game applications, the faster the screen refreshing is, the smoother the application runs. The control modes of the picture refreshing include the following three modes:
one is to increase the frequency of a Central Processing Unit (CPU) if a click operation is monitored; the other is to improve the point reporting rate of the screen, if the movement of the finger on the screen is monitored, the point reporting rate is improved; yet another is to increase the refresh rate of the screen, wherein the refresh rate can be set by the user, the higher the refresh rate, the faster the picture refresh.
Disclosure of Invention
The application provides a control method and a control device.
In one aspect, the present application provides a control method, including:
obtaining a pressing event of an operation body;
determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event;
responding to the pressing event, and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
Optionally, the determining, based on the press event, a currently used screen refresh mechanism of the electronic device includes:
determining a time interval from a last operation event based on the press event, the operation event being related to an operation of the operation body;
if the time interval is greater than or equal to a threshold value, determining that a picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism;
controlling the electronic device to maintain the second refresh mechanism if the time interval is less than the threshold.
Optionally, the method further includes:
if the picture refreshing mechanism is the first refreshing mechanism, maintaining the N frames of response pictures obtained based on the first refreshing mechanism;
and if the N-th frame response picture is obtained, switching to the second refreshing mechanism.
Optionally, the first refresh mechanism includes: controlling a first process and a second process to simultaneously access a first buffer area, and reading picture data from the first buffer area by using the second process when the picture data corresponding to the reaction picture is written into the first buffer area by using the first process, wherein the picture data is used for rendering the reaction picture;
the second refresh mechanism comprises: controlling the first process to write picture data corresponding to a reaction picture into a second buffer area, wherein the second process is prohibited from accessing the second buffer area in the process of writing the picture data into the second buffer area by the first process;
and if the first process finishes writing the picture data and the second process finishes reading the picture data from the third buffer area, reading the picture data from the second buffer area by using the second process, wherein the picture data in the third buffer area is written earlier than the picture data in the second buffer area.
Optionally, the obtaining and displaying a reaction screen in response to the pressing event, where the obtaining of the reaction screen based on a screen refresh mechanism corresponding to the pressing event includes:
if the picture refreshing mechanism is switched from the second refreshing mechanism to the first refreshing mechanism, obtaining picture data written into a first buffer area when the pressing event is responded, and rendering the reaction picture based on the picture data;
wherein the picture data written into the second buffer under the second refresh mechanism is skipped, and the picture data in the second buffer is written earlier than the picture data in the first buffer.
Optionally, the obtaining and displaying a reaction screen in response to the pressing event, where the obtaining of the reaction screen based on a screen refresh mechanism corresponding to the pressing event includes:
writing picture data into a buffer if the picture refresh mechanism is switched from the first refresh mechanism to the second refresh mechanism;
responding to the completion of the writing of the picture data, obtaining the picture data from the buffer area, rendering the reaction picture based on the picture data, and writing the next picture data into another buffer area in the process of obtaining the picture data from the buffer area;
wherein, when switching to the second refresh mechanism, the picture data written under the first refresh mechanism is all obtained.
In another aspect, the present application provides a control apparatus, the apparatus comprising:
an obtaining unit configured to obtain a pressing event of the operation body;
the determining unit is used for determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event;
the control unit is used for responding to the pressing event and obtaining and displaying a reaction picture, and the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
Optionally, the determining unit is configured to determine, based on the pressing event, a time interval from a previous operation event, where the operation event is related to an operation of the operation body; if the time interval is greater than or equal to a threshold value, determining that a picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism; controlling the electronic device to maintain the second refresh mechanism if the time interval is less than the threshold.
Optionally, the control unit is further configured to maintain the obtaining unit to obtain the N-frame response picture based on the first refresh mechanism if the picture refresh mechanism is the first refresh mechanism; and if the N-th frame response picture is obtained, switching to the second refreshing mechanism.
In yet another aspect, the present application provides an electronic device, comprising:
a display screen;
a processor for obtaining a pressing event of an operation body; determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event; responding to the pressing event, obtaining and displaying a reaction picture on the display screen, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
In still another aspect, the present application provides a storage medium having computer program code stored therein, the computer program code implementing the control method described above when executed.
The control method and the control device comprise the following steps: obtaining a pressing event of an operation body; determining a screen refresh mechanism currently used by the electronic device based on the press-down event, obtaining and displaying a reaction screen in response to the press-down event, the reaction screen being obtained based on the screen refresh mechanism corresponding to the press-down event, wherein the electronic device has a first refresh mechanism and a second refresh mechanism, the current screen refresh mechanism used by the electronic device is one of the first refresh mechanism and the second refresh mechanism, so that the electronic device can control the display refresh of the reaction screen based on the two refresh mechanisms in the operation process, the method can determine the corresponding refresh mechanism of the electronic equipment in any operation stage based on the press event in the process of controlling the display refresh of the reaction picture, realizes the selection of the first refresh mechanism or the second refresh mechanism by utilizing the press event, therefore, when the first refreshing mechanism or the second refreshing mechanism is needed, the corresponding pressing event can be triggered as required, and the personalized picture refreshing requirement is met. And the speed of the reaction picture obtained based on the first refreshing mechanism is superior to that of the reaction picture obtained based on the second refreshing mechanism, and the refreshing efficiency of the reaction picture can be improved by utilizing the first refreshing mechanism.
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 it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a control method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a second refresh mechanism provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a first refresh mechanism provided by an embodiment of the present application;
FIG. 4 is a flow chart of another control method provided by an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an application of a control method according to an embodiment of the present application;
FIG. 6 is a flow chart of yet another control method provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of an application of another control method provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of a control device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, an optional flow of a control method provided in an embodiment of the present application is shown, which may include the following steps:
101: a pressing event of the operation body is obtained. The pressing event is an operation event of the operation body aiming at the interactive component of the electronic equipment, and the operation event aiming at the interactive component of the electronic equipment can instruct the electronic equipment to refresh the reaction screen. For example, the interactive component may be a display screen of the electronic device, and if it is detected that an operation body is pressed down on the display screen, it is determined that a pressing event of the operation body is obtained.
The operation body may be an object that a user operates on an interactive component of the electronic device, for example, the operation body may be a finger of the user, an object held by the user may be a stylus, and the like. The user can perform pressing operation on the display screen by using at least one of a finger and a touch pen, so that the electronic equipment monitors a pressing event. Of course, other objects capable of operating the electronic device besides the fingers of the user and the object held by the user may be regarded as the operation body, and the operation body and the component of the electronic device to which the pressing event is directed are not limited in this embodiment.
102: a screen refresh mechanism currently used by the electronic device is determined based on the press event. The electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the currently used picture refreshing mechanism of the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the selected picture refreshing mechanism is matched with the pressing event when the picture refreshing mechanism is selected from the first refreshing mechanism and the second refreshing mechanism.
In this embodiment, the electronic device may read the screen data from the buffer, and render the response screen for display based on the screen data, where the corresponding first refresh mechanism and second refresh mechanism are used to control the time used from writing the screen data into the buffer to reading the screen data from the buffer, and if the time used is shorter, the response screen refreshes faster and more timely, and if the time used is longer, the response screen refreshes slower and has delay.
For example, the electronic device runs a game application, and the display interface of the game application can be changed along with the operation of the operation body. The operation body writes a piece of picture data into the buffer area once the operation body performs operation, and the operation body performs operation once means that the reaction picture of the electronic equipment needs to be adjusted. If the shorter the time from writing the picture data into the buffer area to reading the picture data from the buffer area is, the shorter the time is, the reaction picture can be timely adjusted by the electronic equipment, so that the reaction picture displayed by the electronic equipment can be timely changed by the electronic equipment when the operation body operates, and the response time of the electronic equipment is shortened.
In this embodiment, the relationship between the first refresh mechanism and the second refresh mechanism is: the speed of the reaction picture obtained based on the first refresh mechanism is superior to the speed of the reaction picture obtained based on the second refresh mechanism. The speed of obtaining the reaction picture based on the first refreshing mechanism is superior to the speed of obtaining the reaction picture based on the second refreshing mechanism, which shows that the electronic equipment can quickly and timely obtain the reaction picture based on the first refreshing mechanism, but the reaction picture obtained based on the second refreshing mechanism is delayed, so that the response time of the electronic equipment is shorter than the response time corresponding to the second refreshing mechanism when the electronic equipment refreshes the reaction picture by using the first refreshing mechanism. Based on the relationship between the first refreshing mechanism and the second refreshing mechanism, a user can select one refreshing mechanism from the first refreshing mechanism and the second refreshing mechanism in a targeted manner according to the refreshing requirement of the reaction picture, and can select the refreshing mechanism through a matched pressing event in the selection process.
103: and responding to the pressing event, and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event. If the current picture refreshing mechanism used by the electronic equipment is a first refreshing mechanism, obtaining a reaction picture based on the first refreshing mechanism; and if the current picture refreshing mechanism used by the electronic equipment is the second refreshing mechanism, obtaining the reaction picture based on the second refreshing mechanism. Under a first refresh mechanism and a second refresh mechanism, a first process is used for writing in picture data corresponding to a reaction picture, and a second process is used for reading the picture data, wherein the first refresh mechanism and the second refresh mechanism obtain the reaction picture:
the first refresh mechanism includes: and controlling the first process and the second process to simultaneously access the first buffer area, and reading the picture data from the first buffer area by using the second process when the picture data corresponding to the reaction picture is written into the first buffer area by using the first process, wherein the picture data is used for rendering the reaction picture.
Under the first refreshing mechanism, when the first process writes in the picture data, the second process can read the picture data, and the picture data is written while being read. The second process may be that the first process writes part of the picture data and then reads the picture data, for example, it is monitored that 80% of the picture data is written by the first process and then the picture data is read. In the process of reading the picture data by the second process, the first process can continuously write the picture data corresponding to other reaction pictures, if the second process does not finish reading the picture data and the first process needs to continuously write the picture data corresponding to other reaction pictures at the moment, the first process can write the picture data into another first buffer area and can also continuously write the picture data into the first buffer area which is accessed by the second process; if the second process finishes reading the picture data when the first process continues to write the picture data corresponding to other reaction pictures, the first process can continue to write the picture data into the same first buffer area.
The second refresh mechanism includes: controlling the first process to write the picture data corresponding to the reaction picture into the second buffer area, and forbidding the second process to access the second buffer area in the process of writing the picture data into the second buffer area by the first process; if the first process finishes writing the picture data and the second process finishes reading the picture data from the third buffer area, the second process is utilized to read the picture data from the second buffer area, and the picture data in the third buffer area is written earlier than the picture data in the second buffer area.
Under the second refresh mechanism, the buffer area for writing the image data is locked during the process of writing the image data by the first process, for example, the second buffer area is locked by the first process during the process of writing the image data into the second buffer area, and the second process cannot access the second buffer area. After the first process finishes writing the picture data into the second buffer area, the first process unlocks the second buffer area, and the second process can lock the second buffer area so that the second process can read the picture data from the second buffer area. However, there is a condition that the second process reads the picture data from the second buffer area, and the second process needs to complete the reading of the picture data with the writing time earlier than that of the picture data in the second buffer area, that is, the second process needs to complete the reading of the picture data in the second buffer area before the previously written picture data is completely read.
The first refresh mechanism and the second refresh mechanism are described below with reference to the drawings, where the first process is denoted by Producer and the second process is denoted by Consumer. Fig. 2 shows a process from writing picture data to reading picture data by the second refresh mechanism, where Buffer Item a to Buffer Item d are respectively a Buffer area in a Buffer queue, and the arrangement of Buffer Item a to Buffer Item d in the Buffer queue is as follows: buffer Item a, Buffer Item b, Buffer Item c and Buffer Item d, which means that Buffer Item a is the Buffer arranged at the top in the Buffer queue, and Buffer Item d is the Buffer arranged at the bottom in the Buffer queue.
First, it shows that before Producer, picture data is written into Buffer Item a and Buffer Item b, respectively, and the picture data written into Buffer Item a and Buffer Item b is read by the Consumer at third.
Since the Producer and the Consumer process the picture data asynchronously, when the Consumer reads the picture data from Buffer Item a and Buffer Item b, the Producer has already written the picture data into Buffer Item c and Buffer Item d (there may be another Buffer Item between Buffer Item c and Buffer Item b, and this embodiment only uses four Buffer areas as an example for explanation). Fifthly, the Consumer starts to read the picture data written into Buffer Item c and Buffer Item d in time III, and the Producer writes the picture data into other Buffer areas at the time, the Producer and the Consumer are orderly second refreshing mechanisms, so that the written picture data in time I can be read only in time IV, and the response time of the electronic equipment is kept above one frame of reaction picture. The response time is an interval between a start time, which is a time when the operation body is in contact with the display screen, and an end time, which is a time when the reaction screen is displayed on the display screen, and a time, which is an interval between the operation body in contact with the display screen and the reaction screen, and in which the contact of the operation body with the display screen is captured by the operation system and the response is made, and the response at least enables the reaction screen to be obtained, and the end time is a time when the reaction screen is displayed on the display screen, and the interval between the contact of the
The first response and the second response of the electronic equipment are respectively a response of the electronic equipment, the response comprises that the operation body is in contact with the display screen, the contact of the operation body and the display screen is captured by the operation system and at least a reaction picture can be obtained, and then the reaction picture is displayed on the display screen. Asynchronous processing of picture data between a Producer and a Consumer means that the Producer locks a buffer area operated by the Producer in the process of writing the picture data into the buffer area, so that the Consumer cannot access the same buffer area with the Producer, and after the Producer releases the buffer area operated by the Producer, the Consumer can read the picture data written before only after all the picture data are read, so that the reading of the picture data is delayed to a certain extent.
For example, the Producer writes the picture data into the Buffer Item c and the Buffer Item d (the Buffer Item c and the Buffer Item d are regarded as the second Buffer area described above), and the Consumer needs to read the picture data from the Buffer Item a and the Buffer Item b when the Producer writes the picture data into the Buffer Item c and the Buffer Item d (the Buffer Item a and the Buffer Item b are regarded as the third Buffer area described above). Because the picture data in Buffer Item a and Buffer Item b is earlier than the picture data in Buffer Item c and Buffer Item d, the Consumer can read from Buffer Item c and Buffer Item d only after completing reading from Buffer Item a and Buffer Item b, so that reading of the Consumer is delayed by the writing of the Producer and at least two frames.
FIG. 3 shows a process from the first refresh mechanism writing the frame data to the reading of the frame data, where Buffer items a to c are respectively a Buffer area, a start time (Begin) and an End time (End) are valid times of the first refresh mechanism, and during the valid times of the first refresh mechanism, a first process and a second process can simultaneously access the same Buffer area, for example, the first process and the second process can simultaneously access Buffer Item b (which can be referred to as a first Buffer area), and the Consumer attempts to read the frame data while the Producer writes the frame data.
For example, Producer and Consumer use the same Buffer Item b in (r), (g. Firstly, the Producer writes the picture data into the Buffer Item b, and the Consumer reads the picture data and releases the Buffer Item b. Buffer Item b is already released when the Producer writes the picture data, so that the Producer still writes the picture data into the Buffer Item b and is acquired by the Consumer. If the Producer finishes writing the picture data and then the Consumer reads the picture data, the electronic device can reduce the response time of at least one frame of reaction picture, so that the speed of obtaining the reaction picture by the first refreshing mechanism is better than the speed of obtaining the reaction picture by the second refreshing mechanism.
Within the effective time of the first refresh mechanism, the Consumer does not read the picture data written into the buffer in sequence. For example, in the valid time of the first refresh mechanism, the writing of the picture data in the Buffer Item is earlier than the writing of the picture data in the Buffer Item b, and after the first refresh mechanism is enabled, the Consumer skips the previously written picture data and directly reads the currently written picture data of the Producer; if the first refresh mechanism is finished, the picture data skipped by the Consumer is not read any more, such as the picture data in Buffer Item a in fig. 3 is lost, so the first refresh mechanism can increase the speed of obtaining the reaction picture, but there may be a problem of partial reaction picture loss. The order of writing the picture data can be judged by, but is not limited to, the time of writing the picture data.
In the embodiment, in response to the press event, the process of obtaining and displaying the response screen is different because whether the screen refresh mechanism is switched from the first refresh mechanism to the second refresh mechanism or from the second refresh mechanism to the first refresh mechanism, and the corresponding obtaining process is as follows:
and if the picture refreshing mechanism is switched from the second refreshing mechanism to the first refreshing mechanism, obtaining picture data written into the first buffer area when responding to the pressing event, and rendering a reaction picture based on the picture data. Wherein the picture data written into the second buffer under the second refresh mechanism is skipped, and the picture data in the second buffer is written earlier than the picture data in the first buffer.
Taking the above fig. 3 as an example, the start time in the above fig. 3 indicates that the second refresh mechanism is switched to the first refresh mechanism, the picture data is written into the Buffer Item b at the start time, and the picture data in the Buffer Item a is written earlier than the picture data in the Buffer Item b, so that under the first refresh mechanism, the picture data in the Buffer Item a is skipped (it can be considered that the picture data is not read any more), and the picture data starts to be read from the Buffer Item b.
Writing picture data into the buffer area if the picture refreshing mechanism is switched from the first refreshing mechanism to the second refreshing mechanism; and responding to the completion of the writing of the picture data, obtaining the picture data from the buffer area, rendering a reaction picture based on the picture data, and writing the next picture data into the other buffer area in the process of obtaining the picture data from the buffer area. Wherein, when switching to the second refresh mechanism, the picture data written under the first refresh mechanism is all obtained.
That is, if the screen refresh mechanism is switched from the first refresh mechanism to the second refresh mechanism, the reading of the screen data needs to wait for the completion of the writing of the screen data and the completion of the reading of the previously written screen data, as shown in fig. 3, after the first refresh mechanism is finished (the end time indicates the end), the screen data is written into the Buffer Item c, and at this time, the reading operation on the Buffer Item c is prohibited. If no other picture data is read before the Buffer Item c, the reading is started after the picture data writing of the Buffer Item c is finished, if the other picture data is read before the Buffer Item c, the reading is started from the Buffer Item c after all the picture data before the Buffer Item c is read, so that after the second refreshing mechanism is switched, the electronic device can be controlled to write the picture data according to the arrangement sequence of the Buffer areas and read the picture data according to the writing sequence of the picture data, for example, the first process is controlled to write the picture data according to the arrangement sequence of the Buffer areas and the second process is controlled to read the picture data according to the writing sequence of the picture data, and the response time of more than one frame is recovered.
The control method comprises the following steps: obtaining a pressing event of an operation body; determining a screen refresh mechanism currently used by the electronic device based on the press-down event, obtaining and displaying a reaction screen in response to the press-down event, the reaction screen being obtained based on the screen refresh mechanism corresponding to the press-down event, wherein the electronic device has a first refresh mechanism and a second refresh mechanism, the current screen refresh mechanism used by the electronic device is one of the first refresh mechanism and the second refresh mechanism, so that the electronic device can control the display refresh of the reaction screen based on the two refresh mechanisms in the operation process, the method can determine the corresponding refresh mechanism of the electronic equipment in any operation stage based on the press event in the process of controlling the display refresh of the reaction picture, realizes the selection of the first refresh mechanism or the second refresh mechanism by utilizing the press event, therefore, when the first refreshing mechanism or the second refreshing mechanism is needed, the corresponding pressing event can be triggered as required, and the personalized picture refreshing requirement is met. And the speed of the reaction picture obtained based on the first refreshing mechanism is superior to that of the reaction picture obtained based on the second refreshing mechanism, and the refreshing efficiency of the reaction picture can be improved by utilizing the first refreshing mechanism.
Referring to fig. 4, which shows an alternative flow of another control method provided in the embodiment of the present application, a possible method for determining a screen refresh mechanism is shown, where the method may include the following steps:
201: a pressing event of the operation body is obtained.
202: a time interval from a last operation event is determined based on the press event, the operation event being related to an operation of the operation body.
Other operation events of the operation body may be acquired before the pressing event of the operation body is acquired, and the last operation event is a previous operation event adjacent to the pressing event in all the operation events of the operation body corresponding to the pressing event acquired before. The last operation event can be a pressing event of the operation body, a lifting event of at least one operation body and a lifting event of all the operation bodies, wherein the lifting event is that the operation body is contacted with the display screen and is more separated from the display screen.
The last operation event is used for obtaining the time interval between the pressing event and the last operation event, and the picture refreshing mechanism currently used by the electronic equipment is determined at least based on the time interval.
203: and if the time interval is larger than or equal to the threshold value, determining that the picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism.
204: the control electronics maintain the second refresh mechanism if the time interval is less than the threshold.
The threshold represents the time between two adjacent operational events when the first refresh mechanism is triggered. If the time interval is larger than or equal to the threshold value, determining that the currently used picture refreshing mechanism of the electronic equipment is the time interval of the first refreshing mechanism; if the time interval is less than the threshold, it is determined that the screen refresh mechanism currently in use by the electronic device is still the second refresh mechanism.
As known from the screen refresh mechanism currently used by the electronic device, the electronic device defaults to use the second refresh mechanism, if the pressing event of the operation body is obtained, the possibility that the screen refresh mechanism is changed exists in the electronic device, and therefore the time interval from the last operation event is determined based on the pressing event. If the time interval is larger than or equal to the threshold value, controlling the electronic equipment to switch from the second refreshing mechanism to the first refreshing mechanism; the control electronics maintain the second refresh mechanism if the time interval is equal to the threshold.
Although the speed of obtaining the response frame by the first refresh mechanism is better than the speed of obtaining the response frame by the second refresh mechanism, the first refresh mechanism has the problems of losing the response frame and tearing the response frame caused by simultaneously accessing the same buffer area, the second refresh mechanism can read frame data from each buffer area in sequence to reduce the loss of the response frame, and the access to the buffer area by the second refresh mechanism is asynchronous and does not have the problem of tearing the response frame.
Fig. 5 is a schematic application diagram of the control method provided in the embodiment of the present application, which illustrates a feasible manner of switching the screen refresh mechanism based on a press event, where the press event indicates that a finger falls on the display screen. Touch _ down in fig. 5 indicates that only one Finger is detected to fall on the display screen, Finger _ down and Finger2_ down indicate that fingers fall again under the condition that the fingers contact the display screen, Finger _ up indicates that one Finger is lifted and at least one Finger still exists on the display screen, up indicates that all fingers are lifted from the display screen, no fingers exist on the display screen, and Gap is a time interval.
If the pressing event indicates that no finger or only one finger falls down on the display screen, and the pressing event is the first time that the operation event is monitored after the electronic equipment is started, controlling the electronic equipment to be switched from the second refreshing mechanism to the first refreshing mechanism; if the last operation event of the pressing event is the pressing event, the lifting event of at least one finger or the lifting event of all fingers, determining the time interval Gap between the current pressing event and the last operation time event, and if the time interval is larger than or equal to a threshold value, controlling the electronic equipment to be switched from the second refreshing mechanism to the first refreshing mechanism; if the time interval is less than the threshold, the control electronics remain under the second refresh mechanism.
205: and responding to the pressing event, and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event.
The control method determines the time interval from the last operation event based on the pressing event, wherein the operation event is related to the operation of the operation body; if the time interval is larger than or equal to the threshold value, determining that the currently used picture refreshing mechanism of the electronic equipment is a first refreshing mechanism; if the time interval is smaller than the threshold value, the electronic equipment is controlled to maintain the second refreshing mechanism, the selection of the picture refreshing mechanism is controlled according to the time interval between two operation events, and the frequent switching of the picture data mechanism when the pressing event is frequently operated is reduced, so that the electronic equipment can smoothly display the reaction picture and reduce the abnormal display probability of the reaction picture.
Referring to fig. 6, an alternative flow of another control method provided in the embodiment of the present application is shown, which may include the following steps:
301: a pressing event of the operation body is obtained.
302: a time interval from a last operation event is determined based on the press event, the operation event being related to an operation of the operation body.
303: and if the time interval is larger than or equal to the threshold value, determining that the picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism.
304: and if the picture refreshing mechanism is the first refreshing mechanism, maintaining the N frames of response pictures obtained based on the first refreshing mechanism.
305: and if the N-th frame response picture is obtained, switching to a second refreshing mechanism.
306: the control electronics maintain the second refresh mechanism if the time interval is less than the threshold.
307: and responding to the pressing event, and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event.
The difference from the control method shown in fig. 4 described above is that the control method shown in fig. 6 shows a possible way of switching from the first refresh scheme to the second refresh scheme after switching to the first refresh scheme, which is:
after the first refreshing mechanism is switched, N frames of response pictures are obtained based on the first refreshing mechanism; and if the N-th frame response picture is obtained, switching to a second refreshing mechanism. That is to say, N frames of response pictures are obtained and displayed in total under the first refresh mechanism, and when the Nth frame of response pictures is obtained, the first refresh mechanism is switched to the second refresh mechanism.
The reason why the first refresh mechanism is switched to the second refresh mechanism is that under the first refresh mechanism, the first process for writing the picture data corresponding to the response picture and the second process for reading the picture data access the same buffer (such as the first buffer) at the same time, and during the process of writing the picture data by the first process, the second process can attempt to read the picture data being written by the first process. However, when the second process tries to read the image data, the first process may not complete writing of the image data, so that the second process reads partial data of the currently displayed reaction image, and the electronic device cannot render a complete reaction image on the display screen by using the partial image data, which causes an image tearing problem.
Re-enabling the first refresh mechanism based on a time interval between the re-obtained press-down event and a last operation event thereof, and switching from the second refresh mechanism to the first refresh mechanism if the re-obtained time interval is greater than or equal to a threshold value; if the reacquired time interval is less than the threshold, maintaining under the second refresh mechanism, and continuing to monitor whether a push event is acquired and making a determination of the time interval if a push event is acquired.
In this embodiment, N is a natural number greater than or equal to 1, and N increases the speed of obtaining the response frame and also reduces the probability of abnormal problems such as frame tearing occurring in the response frame. N may be set based on the frequency of the CPU, for example, the value of N may be 1, and the value of N is not limited in this embodiment.
Next, the control method shown in fig. 6 is described with reference to fig. 7, and the point of difference between fig. 7 and fig. 5 is that the N-frame response frame obtained in the first refresh mechanism is shown by a triangle in the pressing operation showing the switching to the first refresh mechanism, and the N-th frame response frame obtained is switched to the second refresh mechanism, and the first refresh mechanism ends the present use.
If the first finger contacts the display screen, determining to obtain a pressing event, wherein the pressing event represents that no finger falls to only one finger on the display screen, and the pressing event is that the electronic equipment monitors an operation event for the first time after being started, controlling the electronic equipment to switch to a first refreshing mechanism to start the first refreshing mechanism, obtaining N frames of reaction images under the first refreshing mechanism, and switching to a second refreshing mechanism when obtaining the N frames of reaction images to reduce the probability of abnormal problems such as image tearing and the like of the reaction images.
The electronic equipment records the time point when the first refreshing mechanism is finished, and at the moment, a finger exists on the display screen; when the electronic equipment monitors that a second finger touches the display screen, determining that a pressing event is obtained, and obtaining a pressing event before the pressing event, the electronic equipment obtains a time interval between two pressing events, wherein the time interval is an interval between a time point of currently obtaining the pressing event and a time point of ending a first refreshing mechanism started by the last pressing event; and the electronic equipment determines that the time interval is greater than or equal to the threshold value, switches to the first refreshing mechanism again, finishes the first refreshing mechanism after obtaining the N frames of response pictures, and records the time point when the first refreshing mechanism finishes this time.
The electronic equipment monitors that one finger leaves, a lifting event of the finger is obtained, and the electronic equipment is maintained under a second refreshing mechanism; the electronic equipment monitors that the finger is pressed after the finger leaves, determines to obtain a pressing event of the finger, and obtains a time interval between the pressing event and a lifting event, wherein the time interval obtained this time is an interval between a current time point of obtaining the pressing event and a previous time point of obtaining the lifting event. And the electronic equipment determines that the time interval is greater than or equal to the threshold value, switches to the first refreshing mechanism again, finishes the first refreshing mechanism after obtaining the N frames of response pictures, and records the time point when the first refreshing mechanism finishes this time.
The electronic equipment monitors that all fingers leave, and maintains the fingers under a second refreshing mechanism; and after monitoring that all fingers leave, monitoring that the fingers are pressed again, determining to obtain the pressing operation of the fingers, and then obtaining a time interval between the pressing operation and a lifting event of all fingers leaving, wherein the time interval obtained this time is an interval between a current time point of obtaining the pressing event and a previous time point of obtaining the lifting event of all fingers leaving. And the electronic equipment determines that the time interval is greater than or equal to the threshold value, switches to the first refreshing mechanism again, finishes the first refreshing mechanism after obtaining the N frames of response pictures, and records the time point when the first refreshing mechanism finishes this time.
According to the technical scheme, after the control method is switched to the first refreshing mechanism, N frames of response pictures are obtained based on the first refreshing mechanism; and if the N-th frame response picture is obtained, switching to a second refreshing mechanism. That is to say, N frames of response pictures are obtained and displayed in total under the first refreshing mechanism, and when the nth frame of response picture is obtained, the first refreshing mechanism is switched to the second refreshing mechanism, so as to reduce the probability of abnormal problems such as picture tearing and the like of the response picture.
In this embodiment, the time interval from the last operation event determined based on the press event may be different from the type of the last operation event. If the last operation event is a press-down event and the last operation event triggers the first refresh mechanism, the determined time interval is the interval between the press-down event and the first refresh mechanism which ends the trigger of the last operation event, and the interval between the time point of the press-down event and the time point of the first refresh mechanism which ends the trigger of the last operation event; if the last operational event was a lift event or a press event but the first refresh mechanism was not triggered, the determined time interval is the interval between two events, such as the interval between the point in time of the press event and the point in time of the last operational event.
In addition, in addition to controlling the end of the first refresh mechanism by obtaining the N-frame response picture, the embodiment may also control the end of the first refresh mechanism by other manners, for example, a manner is that the end of the first refresh mechanism is controlled by a lift-up event of the operation body, so that the first refresh mechanism is triggered to be enabled by a press-down event of the operation body, and the first refresh mechanism is triggered to be ended by the lift-up event; the other mode is to control the end of the first refresh mechanism from the preset time of the first refresh mechanism enabling, so that the first refresh mechanism enabling can be triggered by the pressing event of the operating body, and the end of the first refresh mechanism is triggered by the preset time after the first refresh mechanism enabling
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Referring to fig. 8, an alternative structure of a control device provided in an embodiment of the present application is shown, which may include: an obtaining unit 10, a determining unit 20 and a control unit 30.
An obtaining unit 10 for obtaining a pressing event of the operation body. The pressing event is an operation event of the operation body aiming at the interactive component of the electronic equipment, and the operation event aiming at the interactive component of the electronic equipment can instruct the electronic equipment to refresh the reaction screen. For example, the interactive component may be a display screen of the electronic device, and if it is detected that an operation body is pressed down on the display screen, it is determined that a pressing event of the operation body is obtained.
A determining unit 20 for determining a picture refresh mechanism currently used by the electronic device based on the press event. The electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, and the currently used screen refreshing mechanism of the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism. In the present embodiment, one way for the determination unit 20 to determine the picture refresh mechanism is:
determining a time interval from a previous operation event based on the press event, the operation event being related to the operation of the operation body; if the time interval is larger than or equal to the threshold value, determining that the currently used picture refreshing mechanism of the electronic equipment is a first refreshing mechanism; if the time interval is less than the threshold, the control electronics maintain the second refresh mechanism, as described in detail with reference to the above embodiment.
In this embodiment, the relationship between the first refresh mechanism and the second refresh mechanism is: the speed of the reaction picture obtained based on the first refresh mechanism is superior to the speed of the reaction picture obtained based on the second refresh mechanism. The speed of obtaining the reaction picture based on the first refreshing mechanism is superior to the speed of obtaining the reaction picture based on the second refreshing mechanism, which shows that the reaction picture can be quickly and timely obtained based on the first refreshing mechanism, but the reaction picture obtained based on the second refreshing mechanism has a certain delay, so the response time of the reaction picture when the reaction picture is refreshed by using the first refreshing mechanism is shorter than the response time corresponding to the second refreshing mechanism. Based on the relationship between the first refreshing mechanism and the second refreshing mechanism, a user can select one refreshing mechanism from the first refreshing mechanism and the second refreshing mechanism in a targeted manner according to the refreshing requirement of the reaction picture, and can select the refreshing mechanism through a matched pressing event in the selection process.
And the control unit 30 is used for responding to the pressing event and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event. If the current picture refreshing mechanism used by the electronic equipment is a first refreshing mechanism, obtaining a reaction picture based on the first refreshing mechanism; and if the current picture refreshing mechanism used by the electronic equipment is the second refreshing mechanism, obtaining the reaction picture based on the second refreshing mechanism. Under a first refresh mechanism and a second refresh mechanism, a first process is used for writing in picture data corresponding to a reaction picture, and a second process is used for reading the picture data, wherein the first refresh mechanism and the second refresh mechanism obtain the reaction picture:
the first refresh mechanism includes: and controlling the first process and the second process to simultaneously access the first buffer area, and reading the picture data from the first buffer area by using the second process when the picture data corresponding to the reaction picture is written into the first buffer area by using the first process, wherein the picture data is used for rendering the reaction picture.
The second refresh mechanism includes: controlling the first process to write the picture data corresponding to the reaction picture into the second buffer area, and forbidding the second process to access the second buffer area in the process of writing the picture data into the second buffer area by the first process; if the first process finishes writing the picture data and the second process finishes reading the picture data from the third buffer area, the second process is utilized to read the picture data from the second buffer area, and the picture data in the third buffer area is written earlier than the picture data in the second buffer area.
In this embodiment, the process of obtaining and displaying the response frame by the control unit 30 in response to the press event is different because whether the frame refresh mechanism is switched from the first refresh mechanism to the second refresh mechanism or from the second refresh mechanism to the first refresh mechanism, and the corresponding obtaining process is as follows:
and if the picture refreshing mechanism is switched from the second refreshing mechanism to the first refreshing mechanism, obtaining picture data written into the first buffer area when responding to the pressing event, and rendering a reaction picture based on the picture data. Wherein the picture data written into the second buffer under the second refresh mechanism is skipped, and the picture data in the second buffer is written earlier than the picture data in the first buffer.
Writing picture data into the buffer area if the picture refreshing mechanism is switched from the first refreshing mechanism to the second refreshing mechanism; and responding to the completion of the writing of the picture data, obtaining the picture data from the buffer area, rendering a reaction picture based on the picture data, and writing the next picture data into the other buffer area in the process of obtaining the picture data from the buffer area. Wherein, when switching to the second refresh mechanism, the picture data written under the first refresh mechanism is all obtained.
The control device includes: obtaining a pressing event of an operation body; determining a screen refresh mechanism currently used by the electronic device based on the press-down event, obtaining and displaying a reaction screen in response to the press-down event, the reaction screen being obtained based on the screen refresh mechanism corresponding to the press-down event, wherein the electronic device has a first refresh mechanism and a second refresh mechanism, the current screen refresh mechanism used by the electronic device is one of the first refresh mechanism and the second refresh mechanism, so that the electronic device can control the display refresh of the reaction screen based on the two refresh mechanisms in the operation process, the method can determine the corresponding refresh mechanism of the electronic equipment in any operation stage based on the press event in the process of controlling the display refresh of the reaction picture, realizes the selection of the first refresh mechanism or the second refresh mechanism by utilizing the press event, therefore, when the first refreshing mechanism or the second refreshing mechanism is needed, the corresponding pressing event can be triggered as required, and the personalized picture refreshing requirement is met. And the speed of the reaction picture obtained based on the first refreshing mechanism is superior to that of the reaction picture obtained based on the second refreshing mechanism, and the refreshing efficiency of the reaction picture can be improved by utilizing the first refreshing mechanism.
In this embodiment, the control unit 30 is further configured to maintain the obtaining unit to obtain the N frames of response pictures based on the first refresh mechanism if the picture refresh mechanism is the first refresh mechanism; and if the N-th frame response picture is obtained, switching to a second refreshing mechanism.
The reason why the first refresh mechanism is switched to the second refresh mechanism is that under the first refresh mechanism, the first process for writing the picture data corresponding to the response picture and the second process for reading the picture data access the same buffer (such as the first buffer) at the same time, and during the process of writing the picture data by the first process, the second process can attempt to read the picture data being written by the first process. However, when the second process tries to read the image data, the first process may not complete writing of the image data, so that the second process reads partial data of the currently displayed reaction image, and the electronic device cannot render a complete reaction image on the display screen by using the partial image data, which causes an image tearing problem.
Re-enabling the first refresh mechanism based on a time interval between the re-obtained press-down event and a last operation event thereof, and switching from the second refresh mechanism to the first refresh mechanism if the re-obtained time interval is greater than or equal to a threshold value; if the reacquired time interval is less than the threshold, maintaining under the second refresh mechanism, and continuing to monitor whether a push event is acquired and making a determination of the time interval if a push event is acquired.
In this embodiment, N is a natural number greater than or equal to 1, and N increases the speed of obtaining the response frame and also reduces the probability of abnormal problems such as frame tearing occurring in the response frame. N may be set based on the frequency of the CPU, for example, the value of N may be 1, and the value of N is not limited in this embodiment.
According to the technical scheme, after the first refreshing mechanism is switched, N frames of response pictures are obtained based on the first refreshing mechanism; and if the N-th frame response picture is obtained, switching to a second refreshing mechanism. That is to say, N frames of response pictures are obtained and displayed in total under the first refreshing mechanism, and when the nth frame of response picture is obtained, the first refreshing mechanism is switched to the second refreshing mechanism, so as to reduce the probability of abnormal problems such as picture tearing and the like of the response picture.
An embodiment of the present application further provides an electronic device, including: a display screen and a processor; a processor for obtaining a pressing event of an operation body; determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event; responding to the pressing event, obtaining and displaying a reaction picture on a display screen, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event; the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
The manner in which the processor determines the screen refresh mechanism currently used by the electronic device based on the press event may include: determining a time interval from a previous operation event based on the press event, the operation event being related to the operation of the operation body; if the time interval is larger than or equal to the threshold value, determining that the currently used picture refreshing mechanism of the electronic equipment is a first refreshing mechanism; the control electronics maintain the second refresh mechanism if the time interval is less than the threshold.
The processor is further used for maintaining the N frames of response pictures obtained based on the first refreshing mechanism if the picture refreshing mechanism is the first refreshing mechanism; and if the N-th frame response picture is obtained, switching to a second refreshing mechanism.
For the description of the first refresh mechanism and the second refresh mechanism, and the switching process between the two refresh mechanisms, please refer to the above embodiments, which are not described herein again.
The embodiment of the application also provides a storage medium, wherein the storage medium stores computer program codes, and the computer program codes realize the control method when being executed.
It should be noted that, various embodiments in this specification may be described in a progressive manner, and features described in various embodiments in this specification may be replaced with or combined with each other, each embodiment focuses on differences from other embodiments, and similar parts between various embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims (10)
1. A method of controlling, the method comprising:
obtaining a pressing event of an operation body;
determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event;
responding to the pressing event, and obtaining and displaying a reaction picture, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
2. The method of claim 1, the determining a picture refresh mechanism currently used by an electronic device based on the press event comprising:
determining a time interval from a last operation event based on the press event, the operation event being related to an operation of the operation body;
if the time interval is greater than or equal to a threshold value, determining that a picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism;
controlling the electronic device to maintain the second refresh mechanism if the time interval is less than the threshold.
3. The method of claim 2, further comprising:
if the picture refreshing mechanism is the first refreshing mechanism, maintaining the N frames of response pictures obtained based on the first refreshing mechanism;
and if the N-th frame response picture is obtained, switching to the second refreshing mechanism.
4. The method of claim 1, the first refresh mechanism comprising: controlling a first process and a second process to simultaneously access a first buffer area, and reading picture data from the first buffer area by using the second process when the picture data corresponding to the reaction picture is written into the first buffer area by using the first process, wherein the picture data is used for rendering the reaction picture;
the second refresh mechanism comprises: controlling the first process to write picture data corresponding to a reaction picture into a second buffer area, wherein the second process is prohibited from accessing the second buffer area in the process of writing the picture data into the second buffer area by the first process;
and if the first process finishes writing the picture data and the second process finishes reading the picture data from the third buffer area, reading the picture data from the second buffer area by using the second process, wherein the picture data in the third buffer area is written earlier than the picture data in the second buffer area.
5. The method according to any one of claims 1 to 4, wherein the obtaining and displaying a reaction screen in response to the press-down event, the reaction screen being obtained based on a screen refresh mechanism corresponding to the press-down event comprises:
if the picture refreshing mechanism is switched from the second refreshing mechanism to the first refreshing mechanism, obtaining picture data written into a first buffer area when the pressing event is responded, and rendering the reaction picture based on the picture data;
wherein the picture data written into the second buffer under the second refresh mechanism is skipped, and the picture data in the second buffer is written earlier than the picture data in the first buffer.
6. The method according to any one of claims 1 to 4, wherein the obtaining and displaying a reaction screen in response to the press-down event, the reaction screen being obtained based on a screen refresh mechanism corresponding to the press-down event comprises:
writing picture data into a buffer if the picture refresh mechanism is switched from the first refresh mechanism to the second refresh mechanism;
responding to the completion of the writing of the picture data, obtaining the picture data from the buffer area, rendering the reaction picture based on the picture data, and writing the next picture data into another buffer area in the process of obtaining the picture data from the buffer area;
wherein, when switching to the second refresh mechanism, the picture data written under the first refresh mechanism is all obtained.
7. A control device, the device comprising:
an obtaining unit configured to obtain a pressing event of the operation body;
the determining unit is used for determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event;
the control unit is used for responding to the pressing event and obtaining and displaying a reaction picture, and the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
8. The apparatus according to claim 7, said determining unit configured to determine a time interval from a last operation event based on the press event, the operation event being related to an operation of the operation body; if the time interval is greater than or equal to a threshold value, determining that a picture refreshing mechanism currently used by the electronic equipment is the first refreshing mechanism; controlling the electronic device to maintain the second refresh mechanism if the time interval is less than the threshold.
9. The apparatus according to claim 8, wherein the control unit is further configured to maintain the obtaining unit to obtain N frames of response pictures based on the first refresh mechanism if the picture refresh mechanism is the first refresh mechanism; and if the N-th frame response picture is obtained, switching to the second refreshing mechanism.
10. An electronic device, comprising:
a display screen;
a processor for obtaining a pressing event of an operation body; determining a picture refreshing mechanism currently used by the electronic equipment based on the pressing event; responding to the pressing event, obtaining and displaying a reaction picture on the display screen, wherein the reaction picture is obtained based on a picture refreshing mechanism corresponding to the pressing event;
the electronic equipment is provided with a first refreshing mechanism and a second refreshing mechanism, the current screen refreshing mechanism used by the electronic equipment is one of the first refreshing mechanism and the second refreshing mechanism, and the speed of the reaction screen obtained based on the first refreshing mechanism is superior to the speed of the reaction screen obtained based on the second refreshing mechanism.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110341029.6A CN113050865B (en) | 2021-03-30 | 2021-03-30 | Control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110341029.6A CN113050865B (en) | 2021-03-30 | 2021-03-30 | Control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113050865A true CN113050865A (en) | 2021-06-29 |
CN113050865B CN113050865B (en) | 2022-10-21 |
Family
ID=76516505
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110341029.6A Active CN113050865B (en) | 2021-03-30 | 2021-03-30 | Control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113050865B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473051A (en) * | 2013-09-02 | 2013-12-25 | 小米科技有限责任公司 | Method and device for saving terminal power consumption |
US20140210832A1 (en) * | 2011-10-31 | 2014-07-31 | Beijing Lenovo Software Ltd. | Data transmission method and electronic device |
CN111324235A (en) * | 2020-02-26 | 2020-06-23 | 维沃移动通信有限公司 | Screen refreshing frequency adjusting method and electronic equipment |
CN111767013A (en) * | 2020-06-01 | 2020-10-13 | Oppo(重庆)智能科技有限公司 | Control method, control device, electronic device, computer-readable storage medium |
CN112445315A (en) * | 2019-08-28 | 2021-03-05 | 北京小米移动软件有限公司 | Control method and device for screen refresh frame rate and storage medium |
-
2021
- 2021-03-30 CN CN202110341029.6A patent/CN113050865B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140210832A1 (en) * | 2011-10-31 | 2014-07-31 | Beijing Lenovo Software Ltd. | Data transmission method and electronic device |
CN103473051A (en) * | 2013-09-02 | 2013-12-25 | 小米科技有限责任公司 | Method and device for saving terminal power consumption |
CN112445315A (en) * | 2019-08-28 | 2021-03-05 | 北京小米移动软件有限公司 | Control method and device for screen refresh frame rate and storage medium |
CN111324235A (en) * | 2020-02-26 | 2020-06-23 | 维沃移动通信有限公司 | Screen refreshing frequency adjusting method and electronic equipment |
CN111767013A (en) * | 2020-06-01 | 2020-10-13 | Oppo(重庆)智能科技有限公司 | Control method, control device, electronic device, computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113050865B (en) | 2022-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9329774B2 (en) | Switching back to a previously-interacted-with application | |
CN102866832B (en) | Arrange block | |
CN107122111B (en) | Conversion of touch input | |
US9104440B2 (en) | Multi-application environment | |
CN104035703B (en) | Change client, method and system that view is shown | |
CN102508573B (en) | Method and equipment for realizing rapid positioning through swiping | |
US20130047080A1 (en) | Carousel User Interface For Document Management | |
US20130185676A1 (en) | Method and mobile device for classified webpage switching | |
US9542407B2 (en) | Method and apparatus for media searching using a graphical user interface | |
CN108984225A (en) | The method and apparatus of quick start boarding application | |
CN103069458A (en) | Graphics rendering methods for satisfying minimum frame rate requirements | |
US8947464B2 (en) | Display control apparatus, display control method, and non-transitory computer readable storage medium | |
JP2010108061A (en) | Information processing apparatus, information processing method, and information processing program | |
CN112306256B (en) | Application program switching processing method and device and electronic equipment | |
US20070002014A1 (en) | Pointer for a large display | |
WO2020000970A1 (en) | Method and apparatus for identifying user's interest, and terminal device and storage medium | |
CN104035705B (en) | Client, the method and system of switch view display pattern | |
CN113050865B (en) | Control method and device | |
US9710124B2 (en) | Augmenting user interface elements based on timing information | |
US11113458B2 (en) | Concurrently supporting both document-based and object-based undo operations | |
US20130311934A1 (en) | Method for displaying multi menu pages in one window of multi-touch-sensitive display unit of computing device and computing device applying the method | |
CN111880701B (en) | Page switching method and device and electronic equipment | |
CN115668968A (en) | Interface for communicating threshold values in a camera | |
CN112462989A (en) | Operation method and device of intelligent interaction panel, intelligent interaction panel and medium | |
US7908568B1 (en) | Method of displaying graphical objects |
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 |