WO2018086258A1 - 界面的刷新方法及终端 - Google Patents

界面的刷新方法及终端 Download PDF

Info

Publication number
WO2018086258A1
WO2018086258A1 PCT/CN2017/072197 CN2017072197W WO2018086258A1 WO 2018086258 A1 WO2018086258 A1 WO 2018086258A1 CN 2017072197 W CN2017072197 W CN 2017072197W WO 2018086258 A1 WO2018086258 A1 WO 2018086258A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
user
refresh period
refresh
touch screen
Prior art date
Application number
PCT/CN2017/072197
Other languages
English (en)
French (fr)
Inventor
姚鑫
殷昉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201780009424.6A priority Critical patent/CN108605158B/zh
Publication of WO2018086258A1 publication Critical patent/WO2018086258A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering

Definitions

  • the present application relates to the field of touch screen devices, and more particularly to an interface refresh technology of a touch screen device.
  • the sliding operation on the touch screen becomes the main way of human-computer interaction.
  • the smoothness of the interface refresh of the touch screen device is a key factor affecting the user experience.
  • the refresh of the interface is a periodic action, and a complete interface refresh process needs to be presented in front of the user through the steps of interface layout, interface drawing, and interface display; and each of the refresh processes includes Steps need to be completed in a refresh cycle to bring a continuous, smooth experience.
  • the present application provides an interface refresh method and a terminal to solve the problem of display jamming existing in the interface refreshing in the prior art.
  • a first aspect of the present application provides a method for refreshing an interface, including the following steps:
  • the prediction interface is generated according to the first interface moved along the sliding direction of the user.
  • the prediction interface is displayed at the beginning of the second refresh period.
  • a second aspect of the present application discloses a terminal, including: a memory for storing an instruction; and a processor for performing the following functions by running a program in the memory:
  • the generating a prediction interface according to the first interface that is moved along a sliding direction of the user includes:
  • the image of the second area in the first interface is subjected to a blurring process to obtain an image of the first area, including:
  • An image of the second region is filled into the first region.
  • Pixels of the image of the filled image in the first region are attenuated by a preset attenuation coefficient according to a preset attenuation width in the first region and an adjacent side of the second region.
  • the image of the first region is obtained until the pixel attenuation of the filled image of the first region is completed.
  • the direction and distance of the first interface movement are calculated according to location information of the user contacting the touch screen, including:
  • the first sliding speed and the first sliding time of the user are calculated according to the position information of the user contacting the touch screen in the first refreshing period and the position information of the user contacting the touch screen in the third refreshing period; wherein the third refreshing period is The previous refresh cycle of the first refresh cycle.
  • the determining whether the frame to be displayed in the second refresh period is completed or not is completed, including:
  • the state of the buffer is not the state in which the drawing is completed, it is determined that the frame interface to be displayed in the second refresh period is not drawn.
  • 1 is a display diagram of an interface refresh process in the prior art
  • FIG. 2 is a flowchart of a method for refreshing an interface disclosed in an embodiment of the present application
  • FIG. 3( a ) is a flowchart of a method for calculating a direction and a distance of a frame interface displayed in a first refresh cycle according to an embodiment of the present application;
  • FIG. 3(b) is a diagram showing a manner of predicting an interface disclosed in an embodiment of the present application.
  • FIG. 4 is a display diagram of a two-frame interface disclosed in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • Single buffer technology means that the refresh process of each frame interface uses the same buffer, that is, the interface layout, interface drawing and interface display in each refresh cycle are completed in the same buffer. Specifically, after the steps of the interface layout, the interface drawing, and the interface display of the previous frame interface are completed in the buffer, the buffer is released, and the channel layout, the interface drawing, and the interface display of the subsequent frame interface can be used. the process of. However, if the interface layout of a certain frame interface or the processing time of the interface drawing is too long, the refresh time of the frame interface may exceed the refresh period, and thus the problem of display jam may occur.
  • Multi-buffer technology means that multiple (usually three) buffers can be used for the refresh process of the interface. Specifically, before the interface of the previous frame is not displayed, the new buffer can be used to synchronously perform the interface layout and interface rendering of the subsequent frame interface. In this way, after the display of the previous frame is completed, the interface of the next frame has been drawn and can be directly displayed. However, when the interface layout of a certain frame interface or the processing time of the interface drawing is too long, the interface will not be displayed when the refresh cycle of the frame interface arrives, and no interface can be displayed, and the display card will still appear. Problem. For example, as shown in FIG. 1 , the interface displayed in the first refresh cycle is the first frame interface A.
  • the interface layout of the second frame interface B to be displayed in the second refresh cycle is completed, but The interface B is drawn for a long time, resulting in the end of the first refresh cycle.
  • the interface B has not been drawn yet. Therefore, the interface displayed in the second refresh cycle is still the first frame interface A, and the interface jam occurs.
  • the drawing of the interface B and the interface layout of the third frame interface C are completed; the end time of the third refresh cycle, the drawing of the interface C, and the interface layout and interface rendering of the fourth frame interface A are also All are completed, therefore, interface B can be displayed in the third refresh cycle, interface C can be displayed in the fourth refresh cycle, and the interface refresh process is smooth.
  • the embodiment of the present application provides a method for refreshing the interface.
  • the method for refreshing an interface provided by the embodiment of the present application, as shown in FIG. 2, includes the steps:
  • S201 Determine, at a first moment in the first refresh period, whether a frame interface to be displayed in the second refresh period is completed.
  • the first refresh period mentioned in this step refers to any one refresh period in the refresh process of the interface, and the second refresh period is the next refresh period of the first refresh period.
  • the user slides on the touch screen of the touch screen device. The operation is performed, and the interface of the touch screen device is refreshed for a sliding operation of the user.
  • the refresh process of the interface is performed periodically, and the sliding operation of the corresponding user is calculated according to the refresh rate of the touch screen device, and the number of interface refreshes and the time of one refresh cycle of the interface are required.
  • the refresh rate is 60 Hz.
  • the first time mentioned in this step is a certain time before the end time of the first refresh period, and the time interval between the time and the end time may be set according to the computing capability of the touch screen device, for example, for example, : 1ms moment.
  • the user performs a sliding operation on the touch screen of the touch screen device, starting from the touch of the finger to the touch screen, until the finger leaves the touch screen, recording the coordinate point of the contact point of the finger and the touch screen, and the generation time of the coordinate point, and the coordinate point and The generation time of the coordinate point can be used as the position information of the user in contact with the touch screen.
  • the interface layout and interface drawing work of one frame interface displayed in the initial refresh cycle are performed in the buffer, and the drawing is started at the beginning of the initial refresh cycle.
  • the interface displays and releases the buffer; during the initial refresh cycle, the buffer is used to perform interface layout and interface rendering work of one frame interface displayed in the next refresh cycle, in sequence.
  • the interface layout and interface drawing work of one frame interface displayed in the initial refresh cycle are performed in one buffer, and the drawing is drawn at the beginning of the initial refresh cycle.
  • the interface is displayed; at the same time, the interface layout and the interface drawing work of one frame interface displayed in the next refresh cycle are performed in another buffer, and the display of the frame interface is performed at the start time of the refresh cycle, and is sequentially performed in the same order. .
  • the start time of the second refresh cycle can be known, and whether an interface can be displayed.
  • the second refresh period may be: Any time before the start time, that is, any time before the time of the frame interface to be displayed in the second refresh period, for example, any time in the previous refresh period of the first refresh period.
  • step S201 may specifically include:
  • the state of the buffer is the state in which the drawing is completed.
  • the state of the buffer that saves the pixel value of the frame interface may be a state in which the drawing is not started or a state in which the drawing is not completed. Therefore, detecting the state of the buffer corresponding to the one frame interface to be displayed in the second refresh period, it can be known whether the one frame interface displayed in the second refresh period is completed.
  • step S201 may be performed, and at the start time of the second refresh period, the display is completed. This frame boundary surface. If the result of the determination in step S201 is that it is determined that the frame of one frame to be displayed in the second refresh period is not completed, step S203 may be performed.
  • the interface to be displayed in the second refresh cycle will still be the interface displayed in the first refresh cycle.
  • the refresh cycle shows the same interface, which shows the problem of the stuck.
  • the position information of the user and the touch screen that can reflect the direction of the user's sliding operation and the distance swept in a refresh period is obtained, and the direction of the one frame interface displayed in the first refresh period is calculated according to the position information. And the distance to move.
  • the one frame interface displayed by the first refresh period may also be recorded as the first interface.
  • step S203 may specifically include:
  • S2031 Acquire location information of the user in contact with the touch screen in the first refresh period and location information of the user contacting the touch screen in the third refresh period.
  • the third refresh period is the previous refresh period of the first refresh period.
  • the location information of the user contacting the touch screen includes: a coordinate point of the contact point of the user and the touch screen, and a generation time of the coordinate point. Therefore, the step is specifically: acquiring the contact point of the user with the touch screen in the first refresh period, respectively.
  • S2032 Calculate the first sliding speed V1 and the first sliding time T1 of the user according to the position information of the user contacting the touch screen in the first refresh period and the position information of the user contacting the touch screen in the third refresh period.
  • the coordinate point P1 of the contact point of the user with the touch screen in the first refresh period and the coordinate point P2 of the contact point of the user with the touch screen in the third refresh period may represent the distance that the user slides in a refresh cycle.
  • the coordinate point P1 is acquired at the beginning time of the first refresh period
  • the coordinate point P2 is acquired at the beginning time of the third refresh period
  • the distance between the coordinate point P1 and the coordinate point P2 is obtained. , just the distance the user slides during the third refresh cycle.
  • the generation time of the coordinate point P1 is located in the first refresh period
  • the generation time of the coordinate point P2 is located in the third refresh period
  • the time difference between the two is substantially equal to the sliding time of the user in one refresh period, see also FIG. 3 (b)
  • the fourth refresh period is a previous refresh period of the third refresh period; and the location information of the user contacting the touch screen in the fourth refresh period also includes: a coordinate point P3 of the contact point of the user with the touch screen in the fourth refresh period. And the generation time of this coordinate point.
  • the sliding operation of the user can be understood as a uniform acceleration moving process, and (V1-V2)/T1 is the sliding acceleration of the user in the first refreshing period, and therefore, the basis of the sliding speed of the user in the first refreshing period.
  • the sliding acceleration is added to the user as the predicted sliding speed V of the user in the second refresh period.
  • the time when the user slides in the second refresh period is calculated by (T1+T2)/2, and therefore, the product of the predicted sliding speed of the user in the second refresh period and the time when the user slides in the second refresh period, that is, The distance that the user slides during the second refresh cycle.
  • the distance that the user slides in the second refresh period is added, that is, the coordinate of the contact point of the user with the touch screen in the second refresh period.
  • the pixel point in the upper left corner of the touch screen is calculated as the coordinate origin. If the user slides to the right, the value of the user's coordinate point on the touch screen increases, and vice versa. Therefore, the difference between P4 and P1 in the horizontal direction is calculated, and the difference is the distance of one frame interface movement displayed as the first refresh period, and the positive and negative of the difference can represent the sliding direction of the user, correspondingly, The direction in which one frame of the interface is displayed in a refresh cycle is reversed in the direction of the user's sliding.
  • the one frame interface displayed in the first refresh period is moved according to the direction calculated in step S203, and the moving distance is The distance calculated in step S203.
  • a frame interface 401 displayed in the first refresh cycle moves along the sliding direction indicated by the arrow in the figure to obtain the moved interface 402 and the first area 41.
  • the first area 41 can be understood as the first refresh.
  • the area displayed by the one-frame interface 401 of the periodic display is moved, that is, the frame after the movement fails to cover the entire area of the touch screen.
  • a frame interface may be intercepted on a frame interface displayed in the first refresh cycle according to the moving direction and the moving distance. As the interface after the move.
  • S205 Perform blurring on the image of the second area in the one frame interface displayed in the first refresh period to obtain an image of the first area.
  • the second area 42 is intercepted by a side adjacent to the first area in a frame interface displayed in the first refresh period, and is the same size as the first area. It should be noted that after the one-frame interface displayed in the first refresh period is moved, the first area left has no image, and the image needs to be filled. Since the second area is the area closest to the first area, the image content of the two areas is relatively close, and after the second area is blurred, an image of the first area is formed, and the image of the first area can be made, and in the first The image of the interface after one frame of the interface displayed in the refresh cycle is spliced to form an image, and the picture is smoother.
  • step S205 may specifically include:
  • S2052 Attenuating pixels of the filled image in the second region by using a preset attenuation coefficient according to a preset attenuation width in the first region and an adjacent side of the second region, until the first region is The pixel attenuation of the filled image is completed, resulting in an image of the first region.
  • the padding image of the first region is composed of pixels of substantially m ⁇ n, where m represents a row and n represents a column.
  • the attenuation width is used to fill the pixel by how many pixel columns are spaced between the attenuated pixel columns. For example, when the image is wider, the attenuation is performed every 4 pixel columns, that is, the first attenuated pixel column and the second The attenuated pixel columns are separated by 4 pixel columns.
  • the attenuation coefficient is used to indicate the relationship between two pixel values before and after an attenuation width in each row, for example, the attenuation coefficient is 90%, that is, the value of the latter pixel is attenuated to 90% of the value of the previous pixel.
  • the attenuation width can be set according to the width of the filled image of the first region, and the width of the image of the first region is basically large, and the number of pixels included is larger, and the set attenuation width is larger, and vice versa.
  • the attenuation coefficient may be set according to the value of the pixel point included in the image filled in the first region, or may be combined with the value of the attenuation width, as long as the image after being attenuated by the set attenuation coefficient is smooth transition No, the pixel value suddenly becomes larger and suddenly becomes smaller.
  • the last column of the filled image in the first region is un-attenuated.
  • the number of pixel columns spaced apart from the previous attenuated pixel column is less than the predetermined attenuation width, so that the last column of pixels may be selected to be non-attenuated, or equally attenuated.
  • step S205 may be performed in addition to the manner disclosed in the foregoing embodiments, as long as the algorithm can implement the purpose of performing blur processing on the image of the second area, which is no longer A note.
  • the image of the interface after the one-frame interface displayed in the first refresh cycle and the image of the first region obtained in step S207 are spliced and combined, and the formed image is a prediction interface.
  • step S203 determines that the frame to be displayed in the second refresh period is not drawn, the interface to be displayed in the second refresh period is still displayed as the interface of the first refresh period.
  • steps S205-S208 are performed to actually complete the one-frame interface displayed in the first refresh cycle along the user sliding direction, and generate a prediction according to the interface after the one-frame interface displayed in the first refresh cycle.
  • the process of the interface is used as an interface displayed in the second refresh cycle, and the interface displayed in the two refresh cycles can be sequentially changed, thereby solving the problem of display jam.
  • steps S203 to S206 are one implementation manner of generating a prediction interface according to a frame interface displayed in the first refresh cycle after moving in the user sliding direction.
  • the terminal is a touch screen device, including a touch screen capable of human-computer interaction, as shown in FIG. 5 .
  • the touch screen device further includes:
  • a memory 501 configured to store an instruction
  • the processor 502 is configured to implement the following functions by running a program in the memory:
  • the processor 502 runs the program in the memory 501, and determines that the second refresh period is to be performed at the first time in the first refresh period. Whether the one frame of the displayed interface is drawn or not; if it is determined that the frame to be displayed in the second refreshing period is not drawn, the prediction interface is generated according to the first interface moved along the sliding direction of the user, and the first refresh can be guaranteed. The period and the interface displayed in the second refresh period are sequentially changed, the smoothness of the interface refresh is maintained, and the problem of displaying the jam is solved.
  • the method when the processor 502 performs the step of generating a prediction interface according to the first interface that is moved along the sliding direction of the user, the method is specifically configured to:
  • the first area is an area that is left after the first interface moves, and the second area is intercepted at the first interface and the adjacent side of the first area, and is the same size as the first area.
  • the specific working process of the processor 502 can be referred to the content of the steps S203 to S206 in the method embodiment corresponding to FIG. 2, and details are not described herein again.
  • the processor 502 performs a blur process on the image of the second area in the first interface to obtain an image of the first area, specifically used to:
  • the processor 501 when the processor 501 performs the step of calculating the direction and distance of the first interface movement according to the location information of the user contacting the touch screen, the processor 501 is specifically configured to:
  • the second preset formula is used to calculate the position information of the user in contact with the touch screen during the first refresh period of the user, the predicted sliding speed of the user in the second refresh period, the first sliding time, and the second sliding time, and the user is calculated in the second refresh period.
  • the third refresh period is a previous refresh period of the first refresh period
  • the fourth refresh period is a previous refresh period of the third refresh period.
  • the processor 502 performs a determination to determine whether the frame to be displayed in the second refresh period is not completed.
  • the state of the buffer is not the state in which the drawing is completed, it is determined that the frame interface to be displayed in the second refresh period is not drawn.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本申请提供了一种界面的刷新方法及终端,其中,在第一刷新周期的第一时刻,判断出在第二刷新周期待显示的一帧界面未绘制完成,说明在第二刷新周期要显示的界面仍会为第一刷新周期显示的界面,此时,会出现前后两个刷新周期显示同样的界面的情况,即显示卡顿的问题。在此种情况下,将依据沿用户滑动方向移动后的第一界面,生成预测界面,将该预测界面作为在第二刷新周期显示的界面,可以保证前后两个刷新周期显示的界面是按顺序变化的,进而解决显示卡顿的问题。

Description

界面的刷新方法及终端
本申请要求于2016年11月8日提交中国专利局、申请号为201610980786.7、发明名称为“一种改善显示卡顿的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及触屏设备技术领域,更具体地说,涉及一种触屏设备的界面刷新技术。
背景技术
随着触屏设备的普及,在触摸屏上执行滑动操作成为人机交互的主要方式,在滑动操作的过程中,触屏设备的界面刷新的流畅性是影响用户体验的关键因素。
具体的,界面的刷新是一个周期性的动作,一个完整的界面刷新的过程需要经过界面布局、界面绘制以及界面显示等步骤才能最终呈现在用户眼前;并且,每次的刷新过程所包含的这些步骤都需要在一个刷新周期内完成,才能带来连续、流畅的体验。
但是,由于系统繁忙、界面复杂等各种原因,不能完全保证刷新过程所包含的每一步骤都按时完成,导致界面的一次刷新的时间超过刷新周期,这时就会出现显示卡顿的问题。
发明内容
有鉴于此,本申请提供一种界面的刷新方法及终端,以解决现有技术中进行界面刷新时存在的显示卡顿的问题。
为了实现上述目的,现提出的方案如下:
本申请的第一方面提供了一种界面的刷新方法,包括如下步骤:
在第一刷新周期的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;其中,所述第二刷新周期为所述第一刷新周期的下一刷新周期,所述在第一刷新周期显示的一帧界面为第一界面。
若判断出所述在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面。
在所述第二刷新周期的起始时刻,显示所述预测界面。
从上述过程可以看出:在第一刷新周期的第一时刻,判断出在第二刷新周期待显示的一帧界面未绘制完成,说明在第二刷新周期要显示的界面仍会为第一刷新周期显示的界面,此时,会出现前后两个刷新周期显示同样的界面的情况,即显示卡顿的问题。在此种情况下,将依据沿用户滑动方向移动后的第一界面,生成预测界面,将该预测界面作为在第二刷新周期显示的界面,可以保证前后两个刷新周期显示的界面是按顺序变化的,进而解决显示卡顿的问题。
本申请的第二方面公开了一种终端,包括:存储器,用于存储指令;处理器,用于通过运行所述存储器中的程序,实现以下功能:
在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;若判断出所述在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面;在所述第二刷新周期的起始时刻,控制所述触摸屏显示所述预测界面;其中,所述第二刷新周期为所述第一刷新周期的下一刷新周期,所述在第一刷新周期显示的一帧界面为第一界面。
在一个实现方式中,所述依据沿用户滑动方向移动后的第一界面,生成预测界面,包括:
依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离;
将所述第一界面按照所述方向移动所述距离,获得移动后的界面和第一区域;其中,所述第一区域为所述第一界面移动后空余出的区域。
对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像;其中,所述第二区域在所述第一界面与第一区域相邻侧截取,且与所述第一区域大小相同。
将所述移动后的界面的图像与所述第一区域的图像进行组合,得到所述预测界面。
在一个实现方式中,所述对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像,包括:
将所述第二区域的图像填充到所述第一区域。
以所述第一区域中、与所述第二区域的相邻的一侧为基准,按照预设衰减宽度,对所述第一区域内的填充的图像的像素采用预设衰减系数进行衰减,直至所述第一区域的填充的图像的像素衰减完成,得到所述第一区域的图像。
在一个实现方式中,所述依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离,包括:
依据所述第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第一滑动速度和第一滑动时间;其中,第三刷新周期为第一刷新周期的前一刷新周期。
依据所述第三刷新周期中用户与触摸屏接触的位置信息和第四刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第二滑动速度和第二滑动时间;其中,所述第四刷新周期为所述第三刷新周期的前一刷新周期。
采用第一预设公式计算所述第一滑动速度、所述第二滑动速度和所述第一滑动时间,得到用户在第二刷新周期的预测滑动速度。
采用第二预设公式计算所述用户第一刷新周期中用户与触摸屏接触的位置信息、所述用户在第二刷新周期的预测滑动速度、所述第一滑动时间和所述第二滑动时间,计算得到第二刷新周期中用户与触摸屏的接触点的坐标点。
依据所述第二刷新周期中用户与触摸屏的接触点的坐标点和所述用户第一刷新周期中用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离。
在一个实现方式中,所述判断判断在第二刷新周期待显示的一帧界面是否绘制完成是否绘制完成,包括:
检测所述在第二刷新周期待显示的一帧界面对应的缓冲器的状态。
判断所述缓冲器的状态是否为绘制完成的状态。
其中,若所述缓冲器的状态不是绘制完成的状态,则判断出在第二刷新周期待显示的一帧界面未绘制完成。
附图说明
图1为现有技术中界面刷新过程的展示图;
图2为本申请实施例公开的界面的刷新方法的流程图;
图3(a)为本申请实施例公开的计算得到在第一刷新周期显示的一帧界面移动的方向和距离的方法的流程图;
图3(b)为本申请实施例公开的预测界面的方式的展示图;
图4为本申请实施例公开的两帧界面的展示图;
图5为本申请实施例公开的一种终端的结构示意图。
具体实施方式
单buffer技术,是指每一帧界面的刷新过程要使用同一个缓冲器,即每一个刷新周期内的界面布局、界面绘制以及界面显示等步骤都是在同一个缓冲器中完成。具体的,在前一帧界面的界面布局、界面绘制以及界面显示等步骤在缓冲器中完成之后,该缓冲器释放,才可以用于后一帧界面的界面布局、界面绘制以及界面显示等步骤的过程。但是,如果某一帧界面的界面布局或者界面绘制的处理时间过长,会导致该帧界面的刷新时间超过刷新周期,这样,就会出现显示卡顿的问题。
多buffer技术,是指界面的刷新过程可以使用多个(一般可以是三个)缓冲器。具体的,前一帧的界面还未显示完成前,可采用新的缓冲器同步执行后一帧界面的界面布局和界面绘制的工作。这样,在前一帧界面显示完成后,后一帧界面已经绘制完成,可以直接显示。但是,当某一帧界面的界面布局或界面绘制的处理时间过长,也会使得在该帧界面的刷新周期到来之时,界面没有绘制完成,那就没有界面可以显示,仍然会出现显示卡顿问题。例如:如图1所示,在第一刷新周期显示的界面为第一帧界面A,在A显示的过程中,完成了第二刷新周期要显示的第二帧界面B的界面布局工作,但是界面B的界面绘制的时间过长,导致第一刷新周期的结束时刻,界面B还未绘制完成,因此,在第二刷新周期显示的界面还是第一帧界面A,出现了界面卡顿。在第二刷新周期的结束时刻,界面B的绘制以及第三帧界面C的界面布局都完成;第三刷新周期的结束时刻,界面C的绘制以及第四帧界面A的界面布局和界面绘制也都完成,因此,在第三刷新周期可以显示界面B,第四刷新周期可以显示界面C,界面刷新过程恢复流畅。
基于单buffer技术和多buffer技术执行界面刷新过程中,均存在由于界面布局或界面绘制的时间长导致出现显示卡顿的问题,本申请实施例提供了一种界面的刷新方法。
其中,本申请实施例提供的一种界面的刷新方法,参见图2,包括步骤:
S201、在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成。
其中,本步骤中提及的第一刷新周期指代界面的刷新过程中的任意一个刷新周期,第二刷新周期为第一刷新周期的下一刷新周期。具体的,用户在触屏设备的触摸屏上进行滑 动操作,针对用户的一次滑动操作,触屏设备的界面进行刷新过程。需要说明的是,界面的刷新过程是周期性进行的,并且,要依据触屏设备的刷新率,计算得到对应用户的一次滑动操作,需要进行界面刷新的次数和界面的一个刷新周期的时间。例如:刷新率为60Hz,如果滑动操作的时间为1秒钟,那需要进行60次界面刷新,且一次界面的刷新周期的时间为1000ms/60=16.7ms,因此,在16.7ms的刷新周期内需要进行一帧界面的界面布局、界面绘制和界面显示等步骤,可以保证界面刷新的流畅性。
还需要说明的是,本步骤中提及的第一时刻为第一刷新周期的结束时刻之前的某一时刻,该时刻与结束时刻之间的时间间隔可根据触屏设备的运算能力设置,例如:1ms的时刻。
并且,用户在触屏设备的触摸屏上进行滑动操作,从手指开始接触到触摸屏开始,到手指离开触摸屏结束,记录手指与触摸屏的接触点的坐标点和该坐标点的产生时间,将坐标点和坐标点的产生时间可作为用户与触摸屏接触的位置信息。
其中,在单buffer技术中,在记录几个坐标点之后,在缓冲器中进行在初始刷新周期显示的一帧界面的界面布局及界面绘制工作,在初始刷新周期的起始时刻,将绘制成的界面显示,并释放缓冲器;在初始刷新周期的时间内,使用缓冲器进行在下一刷新周期显示的一帧界面的界面布局和界面绘制工作,依次顺序进行。在多buffer技术中,在记录几个坐标点之后,在一个缓冲器中进行在初始刷新周期显示的一帧界面的界面布局及界面绘制工作,在初始刷新周期的起始时刻,将绘制成的界面显示;与此同时,在另一个缓冲器中进行下一刷新周期显示的一帧界面的界面布局和界面绘制工作,在该刷新周期的起始时间进该帧界面的显示,同样依次顺序进行。
需要说明的是,利用单buffer技术和多buffer技术进行界面刷新的过程中,在前一个刷新周期(称为第一刷新周期)的结束时刻前的某一时刻,判断在下一刷新周期(称为第二刷新周期)显示的一帧界面是否绘制完成,可以获知第二刷新周期的起始时刻,是否有界面可以显示。
还需要说明的是,执行判断在第二刷新周期待显示的一帧界面是否绘制完成这一步骤的时刻,除了是第一刷新周期内的第一时刻以外,还可以是:第二刷新周期的起始时刻之前的任意时刻,即显示在第二刷新周期待显示的一帧界面的时刻之前的任意时刻,例如:第一刷新周期的前一刷新周期内的任意时刻。
可选地,本申请的另一实施例中,步骤S201的实现过程可以具体包括:
检测第二刷新周期待显示的一帧界面对应的缓冲器的状态。
判断缓冲器的状态是否为绘制完成的状态。
其中,无论单buffer技术,还是多buffer技术,界面的刷新过程中,若在某一刷新周期显示的一帧界面已经绘制完成,那需要将该帧界面中包含的各个像素点的像素值保存在缓冲器中,此时,缓冲器的状态为绘制完成的状态。当然,若在某一刷新周期显示的一帧界面还未绘制完成,那保存该帧界面的像素值的缓冲器的状态会是绘制未开始的状态或者绘制未完成的状态。因此,检测第二刷新周期待显示的一帧界面对应的缓冲器的状态,可以获知在第二刷新周期显示的一帧界面是否绘制完成。
还需要说明的是,若步骤S201的判断结果是:判断出在第二刷新周期待显示的一帧界面绘制完成,则可执行步骤S202,在第二刷新周期的起始时刻,显示绘制完成的这一帧界 面。若步骤S201的判断结果是:判断出在第二刷新周期待显示的一帧界面未绘制完成,则可执行步骤S203。
S203、依据用户与触摸屏接触的位置信息,计算得到在第一刷新周期显示的一帧界面移动的方向D和距离L。
需要说明的是,若在第二刷新周期待显示的一帧界面未绘制完成,说明在第二刷新周期要显示的界面仍会为第一刷新周期显示的界面,此时,会出现前后两个刷新周期显示同样的界面的情况,即显示卡顿的问题。
因此,获取能够反映用户的滑动操作的方向和在一个刷新周期中滑动的距离的用户与触摸屏接触的位置信息,并依据该位置信息计算得到在第一刷新周期显示的一帧界面要移动的方向和要移动的距离。其中,第一刷新周期显示的一帧界面也可记为第一界面。
可选地,本申请的另一实施例中,参见图3(a),步骤S203的实现过程可以具体包括:
S2031、获取第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息。
需要说明的是,结合图3(b),第三刷新周期为第一刷新周期的前一刷新周期。并且,用户与触摸屏接触的位置信息包括:用户与触摸屏的接触点的坐标点和该坐标点的产生时间,因此,本步骤具体为:分别获取在第一刷新周期中用户与触摸屏的接触点的坐标点P1和该坐标点的产生时间t1,以及在第三刷新周期中用户与触摸屏的接触点的坐标点P2和该坐标点的产生时间t2。
S2032、依据第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第一滑动速度V1和第一滑动时间T1。
具体的,在第一刷新周期中用户与触摸屏的接触点的坐标点P1和在第三刷新周期中用户与触摸屏的接触点的坐标点P2的距离,可代表用户在一个刷新周期滑动的距离,例如:参见图3(b),坐标点P1在第一刷新周期的起始时刻采集得到,坐标点P2在第三刷新周期的起始时刻采集得到,坐标点P1和坐标点P2之间的距离,刚好是在第三刷新周期用户滑动的距离。并且,坐标点P1的产生时间位于第一刷新周期,坐标点P2的产生时间位于第三刷新周期,两者之间的时间差基本上等于用户在一个刷新周期的滑动时间,同样参见图3(b),坐标点P1的产生时间和坐标点P2的产生时间的差值正好是用户在一个刷新周期滑动的时间。基于此,第一滑动时间T1=t1-t2,用户的第一滑动速度V1=(P1-P2)/(t1-t2)。
S2033、获取第四刷新周期中用户与触摸屏接触的位置信息。
其中,第四刷新周期为第三刷新周期的前一刷新周期;并且,第四刷新周期中用户与触摸屏接触的位置信息也包括:在第四刷新周期中用户与触摸屏的接触点的坐标点P3和该坐标点的产生时间。
还需要说明的是,本实施例中提及的第一、第二、第三以及第四并不代表顺序。
S2034、依据第四刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第二滑动速度V2和第二滑动时间T2。
同样的,参考V1和T1的计算方式,计算得到第二滑动速度V2和第二滑动时间T2。
S2035、依据公式V=V1+(V1-V2)/T1,计算得到用户在第二刷新周期的预测滑动速度V。
需要说明的是,用户的滑动操作可以理解成匀加速移动过程,(V1-V2)/T1即为用户在第一刷新周期的滑动加速度,因此,在用户在第一刷新周期的滑动速度的基础上加上滑动加速度,即可作为用户在第二刷新周期的预测滑动速度V。
S2036、依据公式P4=P1+V×(T1+T2)/2,计算得到第二刷新周期中用户与触摸屏的接触点的坐标点P4。
具体的,用户在第二刷新周期滑动的时间用(T1+T2)/2来计算得到,因此,用户在第二刷新周期的预测滑动速度和用户在第二刷新周期滑动的时间的乘积,即为用户在第二刷新周期滑动的距离。并且,在第一刷新周期中用户与触摸屏的接触点的坐标点P1的基础上,加上用户在第二刷新周期滑动的距离,即为在第二刷新周期中用户与触摸屏的接触点的坐标点P4。
S2037、依据在第二刷新周期中用户与触摸屏的接触点的坐标点P4、和在第一刷新周期中用户与触摸屏的接触点的坐标点P1的距离,得到在第一刷新周期显示的一帧界面移动的方向和距离。
需要说明的是,一般设置触摸屏的左上角的像素点为坐标原点计算,若用户像右滑动,则用户在触摸屏的坐标点的值增大,反之则减小。因此,计算P4与P1在水平方向上的差值,该差值即作为第一刷新周期显示的一帧界面移动的距离,该差值的正负则可代表用户的滑动方向,对应的,第一刷新周期显示的一帧界面移动的方向用户的滑动方向相反。
S204、将在第一刷新周期显示的一帧界面沿方向D移动距离L,获得移动后的界面和第一区域。
为实现第一刷新周期和第二刷新周期显示的界面的差异性,且显示过程的顺畅性,将第一刷新周期显示的一帧界面按照步骤S203中计算得到的方向移动,且移动的距离为步骤S203中计算得到的距离。可参见图4,在第一刷新周期显示的一帧界面401,沿图中箭头指示的滑动方向移动,得到移动后的界面402和第一区域41,第一区域41可以理解为在第一刷新周期显示的一帧界面401移动后空余出的区域,即移动后的一帧界面未能覆盖整个触摸屏的区域。
还需要说明的是,移动在第一刷新周期显示的一帧界面,在具体实现时,可以采用按照移动的方向和移动的距离,在第一刷新周期显示的一帧界面上截取一帧界面,作为移动后的界面。
S205、对在第一刷新周期显示的一帧界面中的第二区域的图像进行模糊处理,得到第一区域的图像。
其中,同样参见图4,第二区域42由在第一刷新周期显示的一帧界面中与第一区域相邻的一侧截取,且与第一区域大小相同。需要说明的是,在第一刷新周期显示的一帧界面移动后,留下的第一区域没有图像,需要填充图像。由于第二区域为距离第一区域最近的区域,两个区域的图像内容较为接近,将第二区域进行模糊处理后,形成第一区域的图像,可以让第一区域的图像,以及在第一刷新周期显示的一帧界面移动后的界面的图像,拼接起来形成的图像,画面较为顺畅。
可选地,本申请的另一实施例中,步骤S205的实现过程可以具体包括:
S2051、将第二区域的图像填充到第一区域。
S2052、以第一区域中、与第二区域的相邻的一侧为基准,按照预设衰减宽度,对第二区域内的填充的图像的像素采用预设衰减系数进行衰减,直至第一区域的填充的图像的像素衰减完成,得到第一区域的图像。
需要说明的是,第一区域的填充图像由基本为m×n的像素点组成,m表示行,n表示列。衰减宽度用于填充图像位于被衰减的像素列之间的间隔多少个像素列,例如:在图像较宽时,每间隔4个像素列进行一次衰减,即第一个衰减的像素列和第二个衰减的像素列之间间隔4个像素列。衰减系数用于表明在每一行中,间隔一个衰减宽度的前后两个像素值之间的关系,例如:衰减系数为90%,即后一个像素的值衰减为前一个像素的值的90%。
本步骤中,衰减宽度可按照第一区域的填充的图像的宽度进行设定,基本为第一区域的图像的宽度大,包含的像素列多,设定的衰减宽度大一些,反之则小一些。衰减系数可按照第一区域的填充的图像中包含的像素点的值的大小进行设定,也可以结合衰减宽度的值,只要能保证以设定后的衰减系数进行衰减后的图像是平滑过渡的,没有像素值的忽然变大和忽然变小即可。
还需要说明的是,若按照预设衰减宽度,对第一区域内的填充的图像的像素采用预设衰减系数进行衰减过程中,第一区域内的填充的图像的最后一列像素是未衰减的像素,且和前一个被衰减的像素列之间的间隔的像素列的数量小于预设衰减宽度,那可以选择将最后一列像素不衰减,或者同样衰减均可以。
还需要说明的是,步骤S205的实现过程除上述实施例公开的方式以外,还可以采用其他算法,只要该算法能够实现对第二区域的图像进行模糊处理的目的即可,此处不再一一说明。
S206、将移动后的界面的图像与第一区域的图像进行组合,得到预测界面。
具体的,将在第一刷新周期显示的一帧界面移动后的界面的图像、以及步骤S207中得到的第一区域的图像拼接组合,形成的图像为预测界面。
需要说明的是,若步骤S203的判断结果是:判断在第二刷新周期待显示的一帧界面未绘制完成,说明在第二刷新周期要显示的界面仍会为第一刷新周期显示的界面,此时,会出现前后两个刷新周期显示同样的界面的情况,即显示卡顿的问题。在此种情况下,执行步骤S205~S208,实际是完成将第一刷新周期显示的一帧界面沿着用户滑动方向移动,依据在第一刷新周期显示的一帧界面移动后的界面,生成预测界面的过程。将该预测界面作为在第二刷新周期显示的界面,可以保证前后两个刷新周期显示的界面是按顺序变化的,进而解决显示卡顿的问题。
并且,还需要说明的是,步骤S203~S206是实现依据沿用户滑动方向移动后的在第一刷新周期显示的一帧界面,生成预测界面的一种实现方式。
S207、在第二刷新周期的起始时刻,显示预测界面。
本申请另一实施例还公开了一种终端,该终端可以保证界面刷新的流畅性,具体的,该终端为一种触屏设备,包括可进行人机交互的触摸屏,如图5所示,该触屏设备还包括:
存储器501,用于存储指令;
处理器502,用于通过运行所述存储器中的程序,实现以下功能:
在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;若判断出在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面;在第二刷新周期的起始时刻,控制触摸屏显示所述预测界面;其中,第二刷新周期为第一刷新周期的下一刷新周期,在第一刷新周期显示的一帧界面为第一界面。
需要说明的是,本实施例中,用户在该终端的触摸屏上执行滑动操作后,处理器502运行存储器501中的程序,在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;若判断出在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面,可以保证在第一刷新周期和在第二刷新周期显示的界面是按顺序变化的,界面刷新的流畅性维持,解决显示卡顿的问题。
可选地,本申请的另一实施例中,处理器502执行依据沿用户滑动方向移动后的第一界面,生成预测界面的步骤时,具体用于:
依据用户与触摸屏接触的位置信息,计算得到第一界面移动的方向和距离;将第一界面按照移动方向移动距离,获得移动后的界面和第一区域;对第一界面中的第二区域的图像进行模糊处理,得到第一区域的图像;将移动后的界面的图像与第一区域的图像进行组合,得到预测界面;
其中,第一区域为第一界面移动后空余出的区域,第二区域在第一界面与第一区域相邻侧截取,且与第一区域大小相同。
本实施例中,处理器502的具体工作过程可参见对应图2的方法实施例中,步骤S203~S206的内容,此处不再赘述。
可选地,本申请的另一实施例中,处理器502执行对第一界面中的第二区域的图像进行模糊处理,得到第一区域的图像时,具体用于:
将第二区域的图像填充到第一区域;以第一区域中、与第二区域的相邻的一侧为基准,按照预设衰减宽度,对第一区域内的填充的图像的像素采用预设衰减系数进行衰减,直至第一区域的填充的图像的像素衰减完成,得到第一区域的图像。
其中,本实施例中,处理器502的具体工作过程可参见对应图2的方法实施例中,步骤S205中的优选实施例的内容,此处不再赘述。
可选地,本申请的另一实施例中,处理器501执行依据用户与触摸屏接触的位置信息,计算得到第一界面移动的方向和距离的步骤时,具体用于:
依据第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第一滑动速度和第一滑动时间;
依据第三刷新周期中用户与触摸屏接触的位置信息和第四刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第二滑动速度和第二滑动时间;
采用第一预设公式计算第一滑动速度、第二滑动速度和第一滑动时间,得到用户在第二刷新周期的预测滑动速度;
采用第二预设公式计算用户第一刷新周期中用户与触摸屏接触的位置信息、用户在第二刷新周期的预测滑动速度、第一滑动时间和第二滑动时间,计算得到第二刷新周期中用户与触摸屏的接触点的坐标点;
依据第二刷新周期中用户与触摸屏的接触点的坐标点和用户第一刷新周期中用户与触摸屏接触的位置信息,计算得到第一界面移动的方向和距离;
其中,第三刷新周期为第一刷新周期的前一刷新周期,第四刷新周期为第三刷新周期的前一刷新周期。
其中,本实施例中,处理器502的具体工作过程可参见对应图3(a)的方法实施例中的内容,此处不再赘述。
可选地,本申请的另一实施例中,处理器502执行判断判断在第二刷新周期待显示的一帧界面是否绘制完成是否绘制完成时,具体用于:
检测所述在第二刷新周期待显示的一帧界面对应的缓冲器的状态;判断所述缓冲器的状态是否为绘制完成的状态;
其中,若所述缓冲器的状态不是绘制完成的状态,则判断出在第二刷新周期待显示的一帧界面未绘制完成。
其中,本实施例中,处理器502的具体工作过程可参见对应图2的方法实施例中,步骤S201中的优选实施例的内容,此处不再赘述。

Claims (10)

  1. 一种界面的刷新方法,其特征在于,包括:
    在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;其中,所述第二刷新周期为所述第一刷新周期的下一刷新周期,所述在第一刷新周期显示的一帧界面为第一界面;
    若判断出所述在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面;
    在所述第二刷新周期的起始时刻,显示所述预测界面。
  2. 根据权利要求1所述的方法,其特征在于,所述依据沿用户滑动方向移动后的第一界面,生成预测界面,包括:
    依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离;
    将所述第一界面按照所述方向移动所述距离,获得移动后的界面和第一区域;其中,所述第一区域为所述第一界面移动后空余出的区域;
    对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像;其中,所述第二区域在所述第一界面与第一区域相邻侧截取,且与所述第一区域大小相同;
    将所述移动后的界面的图像与所述第一区域的图像进行组合,得到所述预测界面。
  3. 根据权利要求2所述的方法,其特征在于,所述对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像,包括:
    将所述第二区域的图像填充到所述第一区域;
    以所述第一区域中、与所述第二区域的相邻的一侧为基准,按照预设衰减宽度,对所述第一区域内的填充的图像的像素采用预设衰减系数进行衰减,直至所述第一区域的填充的图像的像素衰减完成,得到所述第一区域的图像。
  4. 根据权利要求2所述的方法,其特征在于,所述依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离,包括:
    依据所述第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第一滑动速度和第一滑动时间;其中,第三刷新周期为第一刷新周期的前一刷新周期;
    依据所述第三刷新周期中用户与触摸屏接触的位置信息和第四刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第二滑动速度和第二滑动时间;其中,所述第四刷新周期为所述第三刷新周期的前一刷新周期;
    采用第一预设公式计算所述第一滑动速度、所述第二滑动速度和所述第一滑动时间,得到用户在第二刷新周期的预测滑动速度;
    采用第二预设公式计算所述用户第一刷新周期中用户与触摸屏接触的位置信息、所述用户在第二刷新周期的预测滑动速度、所述第一滑动时间和所述第二滑动时间,计算得到第二刷新周期中用户与触摸屏的接触点的坐标点;
    依据所述第二刷新周期中用户与触摸屏的接触点的坐标点和所述用户第一刷新周期中用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离。
  5. 根据权利要求1所述的方法,其特征在于,所述判断判断在第二刷新周期待显示的一帧界面是否绘制完成是否绘制完成,包括:
    检测所述在第二刷新周期待显示的一帧界面对应的缓冲器的状态;
    判断所述缓冲器的状态是否为绘制完成的状态;
    其中,若所述缓冲器的状态不是绘制完成的状态,则判断出在第二刷新周期待显示的一帧界面未绘制完成。
  6. 一种终端,其特征在于,包括用于进行人机交互的触摸屏,还包括:
    存储器,用于存储指令;
    处理器,用于通过运行所述存储器中的程序,实现以下功能:
    在第一刷新周期内的第一时刻,判断在第二刷新周期待显示的一帧界面是否绘制完成;若判断出所述在第二刷新周期待显示的一帧界面未绘制完成,则依据沿用户滑动方向移动后的第一界面,生成预测界面;在所述第二刷新周期的起始时刻,控制所述触摸屏显示所述预测界面;其中,所述第二刷新周期为所述第一刷新周期的下一刷新周期,所述在第一刷新周期显示的一帧界面为第一界面。
  7. 根据权利要求6所述的终端,其特征在于,所述处理器执行依据沿用户滑动方向移动后的第一界面,生成预测界面时,具体用于:
    依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离;将所述第一界面按照所述方向移动所述距离,获得移动后的界面和第一区域;对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像;将所述移动后的界面的图像与所述第一区域的图像进行组合,得到所述预测界面;其中,所述第一区域为所述第一界面移动后空余出的区域,所述第二区域在所述第一界面与第一区域相邻侧截取,且与所述第一区域大小相同。
  8. 根据权利要求7所述的终端,其特征在于,所述处理器执行所述对所述第一界面中的第二区域的图像进行模糊处理,得到所述第一区域的图像时,具体用于:
    将所述第二区域的图像填充到所述第一区域;以所述第一区域中、与所述第二区域的相邻的一侧为基准,按照预设衰减宽度,对所述第一区域内的填充的图像的像素采用预设衰减系数进行衰减,直至所述第一区域的填充的图像的像素衰减完成,得到所述第一区域的图像。
  9. 根据权利要求7所述的终端,其特征在于,所述处理器执行依据用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离时,具体用于:
    依据所述第一刷新周期中用户与触摸屏接触的位置信息和第三刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第一滑动速度和第一滑动时间;其中,第三刷新周期为第一刷新周期的前一刷新周期;
    依据所述第三刷新周期中用户与触摸屏接触的位置信息和第四刷新周期中用户与触摸屏接触的位置信息,计算得到用户的第二滑动速度和第二滑动时间;其中,所述第四刷新周期为所述第三刷新周期的前一刷新周期;
    采用第一预设公式计算所述第一滑动速度、所述第二滑动速度和所述第一滑动时间,得到用户在第二刷新周期的预测滑动速度;
    采用第二预设公式计算所述用户第一刷新周期中用户与触摸屏接触的位置信息、所述用户在第二刷新周期的预测滑动速度、所述第一滑动时间和所述第二滑动时间,计算得到第二刷新周期中用户与触摸屏的接触点的坐标点;
    依据所述第二刷新周期中用户与触摸屏的接触点的坐标点和所述用户第一刷新周期中用户与触摸屏接触的位置信息,计算得到所述第一界面移动的方向和距离。
  10. 根据权利要求6所述的终端,其特征在于,所述处理器执行判断判断在第二刷新周期待显示的一帧界面是否绘制完成是否绘制完成时,具体用于:
    检测所述在第二刷新周期待显示的一帧界面对应的缓冲器的状态;判断所述缓冲器的状态是否为绘制完成的状态;
    其中,若所述缓冲器的状态不是绘制完成的状态,则判断出在第二刷新周期待显示的一帧界面未绘制完成。
PCT/CN2017/072197 2016-11-08 2017-01-23 界面的刷新方法及终端 WO2018086258A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780009424.6A CN108605158B (zh) 2016-11-08 2017-01-23 界面的刷新方法及终端

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610980786.7 2016-11-08
CN201610980786 2016-11-08

Publications (1)

Publication Number Publication Date
WO2018086258A1 true WO2018086258A1 (zh) 2018-05-17

Family

ID=62109215

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072197 WO2018086258A1 (zh) 2016-11-08 2017-01-23 界面的刷新方法及终端

Country Status (2)

Country Link
CN (1) CN108605158B (zh)
WO (1) WO2018086258A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020211029A1 (zh) * 2019-04-18 2020-10-22 深圳市柔宇科技有限公司 一种笔记重绘方法、书写设备和存储介质
KR20220049407A (ko) 2020-10-14 2022-04-21 삼성전자주식회사 디스플레이 장치 및 그 제어 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707877A (zh) * 2011-03-28 2012-10-03 微软公司 预测分割
CN105224350A (zh) * 2014-06-13 2016-01-06 深圳市云帆世纪科技有限公司 一种游戏界面跳转的加速方法及装置
CN105550356A (zh) * 2015-12-28 2016-05-04 魅族科技(中国)有限公司 一种浏览内容预加载方法及终端
CN105677327A (zh) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 一种页面信息预加载的方法及系统
US20170024098A1 (en) * 2014-10-25 2017-01-26 Yieldmo, Inc. Methods for serving interactive content to a user

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8756511B2 (en) * 2012-01-03 2014-06-17 Lg Electronics Inc. Gesture based unlocking of a mobile terminal
JP2014067289A (ja) * 2012-09-26 2014-04-17 Toshiba Corp 情報処理装置および表示制御方法
CA2938442A1 (en) * 2014-02-04 2015-08-13 Tactual Labs Co. Low-latency visual response to input via pre-generation of alternative graphical representations of application elements and input handling on a graphical processing unit
CN104317511B (zh) * 2014-10-14 2017-07-21 中国联合网络通信集团有限公司 屏幕流畅度测试方法及装置
KR20160064839A (ko) * 2014-11-28 2016-06-08 삼성전자주식회사 저주파 화면 표시 방법 및 이를 수행하는 전자장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707877A (zh) * 2011-03-28 2012-10-03 微软公司 预测分割
CN105224350A (zh) * 2014-06-13 2016-01-06 深圳市云帆世纪科技有限公司 一种游戏界面跳转的加速方法及装置
US20170024098A1 (en) * 2014-10-25 2017-01-26 Yieldmo, Inc. Methods for serving interactive content to a user
CN105550356A (zh) * 2015-12-28 2016-05-04 魅族科技(中国)有限公司 一种浏览内容预加载方法及终端
CN105677327A (zh) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 一种页面信息预加载的方法及系统

Also Published As

Publication number Publication date
CN108605158B (zh) 2020-03-20
CN108605158A (zh) 2018-09-28

Similar Documents

Publication Publication Date Title
US9921745B2 (en) Predicting touch input
US10402009B2 (en) System and method for timing input sensing, rendering, and display to minimize latency
EP3158426B1 (en) Methods, systems and media for controlling playback of video using a touchscreen
JP5276145B2 (ja) リスト表示装置
US8947420B2 (en) Processing image content for content motion or touch input
US9910581B2 (en) Video scrolling
CN108876700B (zh) 一种提升vr显示效果的方法和电路
CN103455292B (zh) 业务数据显示处理方法与装置、用户设备
US9135892B2 (en) System and method for viewing content
CN106959808A (zh) 一种基于手势控制3d模型的系统及方法
US9407797B1 (en) Methods and systems for changing duty cycle to reduce judder effect
CN103021007A (zh) 一种动画播放的方法,装置及设备
RU2015148842A (ru) Интерактивные видеоигры
WO2018086258A1 (zh) 界面的刷新方法及终端
WO2015196804A1 (zh) 虚拟桌面图像处理方法、装置、虚拟桌面服务器及瘦终端
CN104142807A (zh) 基于安卓控件利用OpenGL绘制图像的方法和系统
WO2015180448A1 (zh) 移动终端播放方式切换方法、装置、存储介质和程序
KR102161745B1 (ko) 터치 입력에 시각적 피드백을 제공하는 가속기, 터치 입력에 시각적 피드백을 제공하는 터치 입력 프로세싱 디바이스 및 방법
CN107015726A (zh) 一种动态信息展示方法及装置
US10350493B2 (en) Information processing program and information processing method
EP4163767A1 (en) Device and method for reducing display output lag of touch input
EP2921944B1 (en) User interface
Nilsson Hardware Supported Frame Correction in Touch Screen Systems-For a Guaranteed Low Processing Latency
CN118035580A (zh) 一种页面中三维控件的显示方法及装置
CN117631941A (zh) 图像更新方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17868574

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17868574

Country of ref document: EP

Kind code of ref document: A1