Page display method and electronic device
By screenshotting controls with lower rendering efficiency when sliding the page of electronic devices and rendering using screenshot images during the sliding process, combined with the double buffer solution, the problem of lag during page sliding is solved, and the sliding efficiency and frame rate are improved.
Patent Information
- Application Number
- CN202310855298.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2043-07-12
AI Technical Summary
When existing electronic devices slide on pages, since the graphics processor does not support rendering of complex controls, a large amount of mathematical calculations are required through the central processor, resulting in a long page refresh time, low refresh frame rate, and screen stuttering.
By screenshotting controls with low rendering efficiency when the page is sliding, and rendering the screenshot image is used to reduce the memory overhead of the actual use scene, and improve page rendering efficiency and frame rate in a double buffer solution during the sliding process.
It improves efficiency during sliding, reduces the problem of sliding frame card, shortens the rendering time of each frame page, improves the page refresh frame rate, and overcomes the problem of stuttering page sliding.
Smart Images

Figure CN117075786B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of electronic devices, and in particular to a page display method and an electronic device. Background Art
[0002] Currently, when rendering a page of an electronic device, due to the limitations of the graphics processing unit (GPU) hardware chip used, the rendering and drawing of some complex controls in the page (such as arc controls and various curve controls) are not supported. As a result, the complex controls need to first undergo a large amount of mathematical calculations through the central processing unit (CPU), and then be disassembled into multiple simple interfaces supported by the GPU. The GPU is then called to process the multiple simple interfaces to complete the rendering and drawing of the complex controls.
[0003] When a page of an electronic device is refreshed, the electronic device needs to re-render the page. Therefore, a large amount of CPU time is required for the page refresh process, resulting in a long refresh time for each page and a low refresh frame rate, which causes the user's screen to display jitter. Summary of the invention
[0004] The embodiments of the present application provide a page display method and an electronic device, which can improve the efficiency during the sliding process and reduce the problem of frame jamming during sliding.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a page display method is provided, which is applied to an electronic device, wherein the electronic device includes a screen, and the method includes: when the screen displays a first page, the electronic device responds to a sliding operation on the screen, and takes a screenshot of a first control in the first page to obtain a first picture; wherein the rendering efficiency of the first control is less than a preset threshold; and the electronic device displays a second page during the page sliding process, and the second page includes an image rendered from the first picture.
[0007] Through the above technical solution, when the page is sliding, the page controls with low rendering efficiency can be screenshotted, and then the screenshots can be used for rendering during the sliding process. This solution can improve the efficiency of the sliding process and reduce the problem of frame jamming during sliding.
[0008] In a possible implementation of the first aspect, the electronic device includes a first buffer, and a screenshot process is performed on the first control in the first page to obtain a first picture, including: when the first buffer includes the rendered image information corresponding to the first page, the electronic device performs a screenshot process on the first image information in the first buffer to obtain the first picture; wherein the first image information is the rendered image information corresponding to the first control in the first buffer. Thus, by only taking a screenshot of the image information corresponding to the control with low rendering efficiency, the memory overhead of the actual use scenario can be reduced. Among them, since the rendering of a picture only needs to call the GPU interface once to complete, compared with directly rendering the first control in the page, the rendering efficiency is very high. In addition, the rendering efficiency of controls other than the first control is relatively high. The GPU renders the above-mentioned controls with relatively high rendering efficiency, which can speed up the GPU rendering speed, shorten the rendering time of each frame of the page as a whole, improve the page refresh frame rate of the electronic device, and overcome the problem of page sliding jam.
[0009] In a possible implementation of the first aspect, the electronic device includes a first buffer, and performs a screenshot process on a first control of a first page to obtain a first image, including: when the position of the first control exceeds the screen of the electronic device, the electronic device moves the image information corresponding to the first control to the first buffer; the electronic device renders the image information corresponding to the first control in the first buffer to obtain rendered second image information; and the electronic device performs a screenshot process on the second image information to obtain the first image.
[0010] In a possible implementation of the first aspect, the electronic device includes a first buffer, the first buffer includes rendered image information of a screen display page, and a first control of the first page is screenshoted to obtain a first image, including: when the size of the first control exceeds the screen of the electronic device, the electronic device divides the first control into a preset number of control units; wherein the size of the control unit does not exceed the screen of the electronic device; the electronic device moves the image information corresponding to the position of each control unit to the first buffer, renders the image information corresponding to the control unit, and obtains rendered third image information; the electronic device screenshots multiple third image information to obtain multiple second images, and the multiple second images include screenshots of a preset number of control units; the electronic device splices multiple second images to obtain the first image. Therefore, if there is an overlong control with relatively low efficiency, screenshots of the image information corresponding to the overlong control can optimize the rendering frame rate of controls that exceed one screen during page sliding, thereby improving the rendering frame rate of the entire page.
[0011] In a possible implementation of the first aspect, before the electronic device moves the image information corresponding to the first control or the image information corresponding to the control unit to the first buffer, the electronic device further includes: clearing information from a target area in the first buffer; wherein the target area is the same size as the first control or the control unit. After clearing information from the target area in the first buffer, the image information corresponding to the first control or the image information corresponding to the control unit moved to the target area is not affected.
[0012] In a possible implementation of the first aspect, after taking a screenshot of the first control of the first page to obtain the first picture, it also includes: the electronic device restores the image information before the target area information is cleared to obtain the restored image information, and the electronic device at least renders the restored image information; or, the electronic device redisplays the first page.
[0013] In a possible implementation of the first aspect, the electronic device further includes a second buffer, and the electronic device displays the second page during page sliding, including: the electronic device sends the rendered first image from the first buffer to the second buffer, and sends the rendered first image to the screen of the electronic device through the second buffer; the screen of the electronic device displays the second page based on the rendered first image. By implementing rendering and image sending in double buffering, the efficiency of page rendering can be higher and the frame rate can be improved.
[0014] In a possible implementation of the first aspect, the screen of the electronic device displays a second page based on the rendered first image, including: the electronic device determines valid image information of the rendered first image; wherein a position corresponding to the valid image information is within the screen range; and the screen of the electronic device displays the second page based on the valid image information.
[0015] In a possible implementation of the first aspect, the first page further includes a second control, and the second page includes an image rendered from the first image and an image rendered from the second control. Thus, when the page is slid, a page control with a relatively low rendering efficiency in the page can be screenshotted in a buffer, and then the screenshot image is used to render together with the remaining controls in the page during the sliding process. This solution can improve the efficiency during the sliding process and reduce the problem of frame jamming during sliding.
[0016] In a possible implementation manner of the first aspect, the method further includes: a rendering efficiency of the second control is greater than a rendering efficiency of the first control.
[0017] In a possible implementation of the first aspect, after the electronic device displays the second page during the page sliding process, the method further includes: the electronic device displays a third page in response to the end of the sliding operation; wherein the third page includes an image rendered of the first control.
[0018] In a possible implementation of the first aspect, the electronic device obtains fourth image information rendered by the first control; the electronic device replaces the first picture in the image information corresponding to the last second page with the fourth image information to obtain a third page.
[0019] In a second aspect, the present application provides an electronic device, comprising: a communication module, a display screen, a memory and one or more processors; the communication module, the display screen, the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the electronic device, the electronic device executes the method described in the first aspect above.
[0020] In a third aspect, the present application provides a computer-readable storage medium, in which computer instructions are stored. When the computer-readable storage medium is executed on an electronic device, the electronic device can execute any of the methods described in the first aspect.
[0021] In a fourth aspect, the present application provides a computer program product comprising computer instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.
[0022] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor, wherein the processor is used to call a computer program in a memory to execute a method as described in any one of the first aspects.
[0023] It can be understood that the electronic device described in the second aspect provided above, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a page sliding scenario provided in an embodiment of the present application;
[0025] Figure 2 A schematic diagram of a rendering display process provided by an embodiment of the present application;
[0026] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0028] Figure 5 A flow chart of a page display method provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of a control screenshot provided in an embodiment of the present application;
[0030] Figure 7 A schematic diagram of another control screenshot provided in an embodiment of the present application;
[0031] Figure 8 A schematic diagram of another control screenshot provided in an embodiment of the present application;
[0032] Fig. 9 A schematic diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0034] It should be noted that the following terms "first", "second", etc. are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0035] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0036] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0037] like Figure 1 In the page sliding scene shown, the electronic device responds to the user's upward sliding operation on the electronic device's page 101, and after detecting that the user's sliding operation is completed, it displays page 102. From page 101 to page 102, the display position of control 1 changes. During the page sliding process, the page is drawn and rendered in real time according to the sliding track.
[0038] Currently, when rendering a page of an electronic device, due to the limitations of the graphics processing unit (GPU) hardware chip used, the rendering and drawing of some complex controls in the page (such as arc controls and various curve controls) are not supported. As a result, the complex controls need to first undergo a large amount of mathematical calculations through the central processing unit (CPU), and then be disassembled into multiple simple interfaces supported by the GPU. The GPU is then called to process the multiple simple interfaces to complete the rendering and drawing of the complex controls.
[0039] When a page of an electronic device is refreshed, the electronic device needs to re-render the page. Therefore, a large amount of CPU time is required for the page refresh process, resulting in a long refresh time for each page and a low refresh frame rate, which causes the user's screen to display jitter.
[0040] Therefore, the embodiment of the present application provides a page display method, which can take a screenshot of the page control with low rendering efficiency in the page when the page is slid, and then use the screenshot image to render and display the page during the sliding process. This solution can improve the efficiency of the sliding process and reduce the problem of frame jamming during sliding.
[0041] In the embodiment of the present application, the electronic device can use a dual frame buffer solution to render and display the page, which includes two buffers, one buffer as the front buffer and the other buffer as the back buffer. The back buffer receives the rendered image information and then copies it to the front buffer for display on the screen. Figure 2As shown, the GPU can render the control in buffer 1, and buffer 1 is responsible for saving the drawn and rendered image information. Then buffer 1 can copy the rendered graphics information to buffer 2, and buffer 2 sends the image to be displayed on the screen. Buffer 1 is responsible for the actual graphics rendering work, and buffer 2 is responsible for the screen display. When the screen refresh needs to be re-rendered, it is only necessary to copy the contents of buffer 1 to buffer 2, and only need to wait for the memory copy time, and there is no need to wait until the graphics are redrawn and rendered. And after the contents of buffer 1 are copied to buffer 2, buffer 1 can continue to render when buffer 2 sends the image. Therefore, by implementing the above-mentioned page display method in a double frame buffer, the electronic device can make page rendering more efficient and improve the frame rate.
[0042] The electronic device in the embodiment of the present application may be an electronic device with a screen display. Exemplarily, the electronic device in the embodiment of the present application may be a tablet computer, a mobile phone, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, a vehicle-mounted device, and the like. The embodiment of the present application does not impose any special restrictions on the specific form of the electronic device.
[0043] The execution subject of the page display method provided in the embodiment of the present application may be a device, and the execution device may be Figure 3 The electronic device shown. Meanwhile, the execution device may also be a central processor of the electronic device, or a control module for page display in the electronic device. In the embodiment of the present application, the page display method provided by the embodiment of the present application is described by taking the electronic device executing the page display method as an example.
[0044] The following will describe the implementation of the embodiment of the present application in detail with reference to the accompanying drawings. Taking the above-mentioned electronic device as a mobile phone as an example, the hardware structure of the electronic device (such as the electronic device 400) is introduced. Figure 3 The electronic device 400 shown is merely one example of an electronic device, and the electronic device 400 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 3 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0045] See also Figure 3 , Figure 3 The hardware structure diagram of the electronic device is shown in FIG. Figure 3 As shown, the electronic device 400 may include: a processor 410, an external memory interface 420, an internal memory 421, a USB interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc.
[0046] Among them, the above-mentioned sensor module 480 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
[0047] The touch sensor is also called a "touch panel". The touch sensor can be set on the display screen 494, and the touch sensor and the display screen 494 form a touch screen, also called a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The detected touch operation can be transmitted to the application processor to determine the type of touch event and provide corresponding visual output through the display screen 494. In other embodiments, the touch sensor can also be set on the surface of the electronic device 400, which is different from the position of the display screen 494.
[0048] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be set on the display screen 494. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device 400 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 494, the electronic device 400 detects the touch operation intensity according to the pressure sensor. The electronic device 400 can also calculate the touch position according to the detection signal of the pressure sensor 480A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0049] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 400. In other embodiments, the electronic device 400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0050] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0051] The controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0052] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or cyclically used. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.
[0053] In some embodiments, the processor 410 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0054] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDL) and a serial clock line (SCL). In some embodiments, the processor 410 may include multiple groups of I2C buses. The processor 410 may be coupled to the touch sensor 480K, the charger, the flash, the camera 493, etc. through different I2C bus interfaces. For example: the processor 410 may be coupled to the touch sensor 480K through the I2C interface, so that the processor 410 communicates with the touch sensor 480K through the I2C bus interface to realize the touch function of the electronic device 400.
[0055] The I2S interface can be used for audio communication. In some embodiments, the processor 410 can include multiple groups of I2S buses. The processor 410 can be coupled to the audio module 470 via the I2S bus to achieve communication between the processor 410 and the audio module 470. In some embodiments, the audio module 470 can transmit an audio signal to the wireless communication module 460 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0056] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 470 and the wireless communication module 460 can be coupled via a PCM bus interface. In some embodiments, the audio module 470 can also transmit audio signals to the wireless communication module 460 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication, and the sampling rates of the two interfaces are different.
[0057] The UART interface is a universal serial data bus for asynchronous communication. The bus is a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 410 and the wireless communication module 460. For example, the processor 410 communicates with the Bluetooth module through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 470 can transmit audio signals to the wireless communication module 460 through the UART interface to implement the function of playing music through the Bluetooth headset.
[0058] The MIPI interface can be used to connect the processor 410 with peripheral devices such as the display screen 494 and the camera 493. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 410 and the camera 493 communicate via the CSI interface to realize the shooting function of the electronic device 400. The processor 410 and the display screen 494 communicate via the DSI interface to realize the display function of the electronic device 400.
[0059] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 410 with the camera 493, the display screen 494, the wireless communication module 460, the audio module 470, the sensor module 480, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0060] The USB interface 430 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 430 may be used to connect a charger to charge the electronic device 400, or may be used to transmit data between the electronic device 400 and a peripheral device. The USB interface 430 may also be used to connect headphones to play audio through the headphones. The USB interface 430 may also be used to connect other electronic devices, such as AR devices, etc.
[0061] It is understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 400. In other embodiments, the electronic device 400 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0062] The charging management module 440 is used to receive charging input from a charger. In this embodiment of the application, the charger may be a wired charger, and the charging management module 440 may receive charging input from the wired charger through the USB interface 430 (i.e., the above-mentioned charging interface). While the charging management module 440 is charging the battery 442, it may also power the electronic device through the power management module 441.
[0063] The power management module 441 is used to connect the battery 442, the charging management module 440 and the processor 410. The power management module 441 receives input from the battery 442 and / or the charging management module 440, and supplies power to the processor 410, the internal memory 421, the external memory, the display screen 494, the camera 493, and the wireless communication module 460. The power management module 441 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 441 can also be set in the processor 410. In other embodiments, the power management module 441 and the charging management module 440 can also be set in the same device.
[0064] The wireless communication function of the electronic device 400 can be implemented through the antenna 1, the antenna 2, the mobile communication module 450, the wireless communication module 460, the modem processor and the baseband processor.
[0065] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 400 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0066] The RF module can provide a communication processing module for wireless communication solutions including 2G / 3G / 4G / 5G, etc., applied to the electronic device 400. The RF module may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The RF module receives electromagnetic waves from the antenna 1, and performs filtering, amplification, and other processing on the received electromagnetic waves, and transmits them to the modem for demodulation. The RF module can also amplify the signal modulated by the modem, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the RF module may be arranged in the processor 410. In some embodiments, at least some of the functional modules of the RF module may be arranged in the same device as at least some of the modules of the processor 410.
[0067] The mobile communication module 450 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 400. The mobile communication module 450 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0068] The mobile communication module 450 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 450 can be set in the processor 410. In some embodiments, at least some functional modules of the mobile communication module 450 can be set in the same device as at least some modules of the processor 410.
[0069] The wireless communication module 460 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 400. For example, in the embodiment of the present application, the electronic device 400 can access the Wi-Fi network through the wireless communication module 460.
[0070] The wireless communication module 460 may be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 410. The wireless communication module 460 may also receive a signal to be sent from the processor 410, modulate the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna 2.
[0071] In some embodiments, the antenna 1 of the electronic device 400 is coupled to the mobile communication module 450, and the antenna 2 is coupled to the wireless communication module 460, so that the electronic device 400 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0072] The electronic device 400 implements the display function through a GPU, a display screen 494, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs, which execute program instructions to generate or change display information.
[0073] The display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 400 may include 1 or N display screens 494, where N is a positive integer greater than 1.
[0074] In the embodiment of the present application, the display screen 494 can be used to display the interface of the electronic device. The display screen 494 can be used to display the system desktop of the electronic device, and the system desktop of the electronic device can include multiple application icons. The application icons can be displayed at different positions of the display screen 494, that is, they constitute the layout of the system desktop of the electronic device.
[0075] In the embodiment of the present application, the display screen 494 may be used to display a display schematic diagram of an application interface of the electronic device.
[0076] The electronic device 400 can realize the shooting function through ISP, camera 493, video codec, GPU, display screen 494 and application processor.
[0077] ISP is used to process the data fed back by camera 493. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 493.
[0078] The camera 493 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 400 may include 1 or N cameras 493, where N is a positive integer greater than 1.
[0079] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 400 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0080] Video codecs are used to compress or decompress digital videos. The electronic device 400 may support one or more video codecs. Thus, the electronic device 400 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0081] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 400, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0082] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400. The external memory card communicates with the processor 410 through the external memory interface 420 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0083] The internal memory 421 may be used to store computer executable program codes, which include instructions. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the internal memory 421. For example, in an embodiment of the present application, the processor 410 may execute the instructions stored in the internal memory 421, and the internal memory 421 may include a program storage area and a data storage area.
[0084] The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 400 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0085] The electronic device 400 can implement audio functions such as music playing and recording through the audio module 470, the speaker 470A, the receiver 470B, the microphone 470C, the headphone jack 470D, and the application processor.
[0086] The audio module 470 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 470 can also be used to encode and decode audio signals. In some embodiments, the audio module 470 can be arranged in the processor 410, or some functional modules of the audio module 470 can be arranged in the processor 410.
[0087] The speaker 470A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 400 can listen to music or listen to a hands-free call through the speaker 470A.
[0088] The receiver 470B, also called a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 400 receives a call or a voice message, the voice can be received by placing the receiver 470B close to the human ear.
[0089] Microphone 470C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 470C to input the sound signal into the microphone 470C. The electronic device 400 can be provided with at least one microphone 470C. In some embodiments, the electronic device 400 can be provided with two microphones 470C, which can not only collect sound signals but also realize noise reduction function. In some embodiments, the electronic device 400 can also be provided with three, four or more microphones 470C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc. In the embodiment of the present application, after the voice control function is turned on, in the supported video application, the electronic device can receive the user's voice information through the microphone.
[0090] The earphone interface 470D is used to connect a wired earphone and can be a USB interface 430 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0091] The key 490 includes a power key, a volume key, etc. The key 490 may be a mechanical key or a touch key. The electronic device 400 receives the key 490 input and generates a key signal input related to the user settings and function control of the electronic device 400.
[0092] Motor 491 can generate vibration prompts. Motor 491 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Touch operations acting on different areas of the display screen 494 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0093] Indicator 492 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0094] The SIM card interface 495 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 400 by inserting the SIM card interface 495 or pulling the SIM card interface 495 out. The electronic device 400 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 495 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0095] The methods in the following embodiments can all be implemented in an electronic device 400 having the above-mentioned hardware structure. Multiple cards can be inserted into the same SIM card interface 495 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 495 can also be compatible with different types of SIM cards. The SIM card interface 495 can also be compatible with external memory cards. The electronic device 400 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 400 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 400 and cannot be separated from the electronic device 400.
[0096] although Figure 3 Not shown, the electronic device 400 may also include a flash, a micro-projection device, a near field communication (NFC) device, etc., which will not be described in detail here.
[0097] The software system of the electronic device 400 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0098] Figure 4 It is a software structure diagram of the electronic device provided in the embodiment of the present application. The layered architecture can divide the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers, from top to bottom, namely, the application layer (referred to as the application layer, Application), the application framework layer (referred to as the framework layer, Framework), and the kernel layer (Kernel, also known as the driver layer). For example, Figure 4 As shown, the electronic device may include an application layer, a framework layer and a kernel layer.
[0099] Application layer: can include a series of application packages. For example, Figure 4The application layer shown may include: communication applications, health applications, sports applications, system applications, and audio applications. Among them, communication applications may include: information, call logs, contacts, and communication settings. Health applications may include: heart rate, blood oxygen, pressure, breathing, sleep, and psychological cycles. Sports applications may include: exercise applications, physical age, activity records, exercise records, and training status. System applications may include: compass, weather, alarm clock, stopwatch, message, altitude barometer, and settings. Audio applications may include local music and online music, etc.
[0100] The framework layer provides application programming interface (API) and programming framework for the application layer applications. Figure 4 As shown, the framework layer can provide a user interface UI adaptation layer and a UIKIT framework.
[0101] The UIKIT framework is a front-end framework. The UIKIT framework includes: controls (label, button, image view, chart, circle progress), events, animation, fonts, rendering, screenshots, event (drag, click, scroll) processing, etc. Applications at the application layer can call the above functions in the UIKIT framework. For example, if you want to use the screenshot function for a control with low rendering efficiency in the application, you can call the screenshot function corresponding to the control in the UIKIT framework.
[0102] Among them, the UI adaptation layer involves the rendering process, which includes two interrupt events (ER interrupt and TE interrupt) and two threads (UI thread and Display thread). Interrupts and threads belong to the kernel, but the interrupt processing process and thread callback functions are implemented in the upper layer. Among them, the reported event processing has two corresponding interrupt callback functions to handle the interrupt. That is, after receiving the interrupt report, the UI adaptation layer sends a message to the operating system, among which the rendering message is sent to the UI thread, and the double frame buffer copy and image sending messages are sent to the Display thread.
[0103] The kernel layer may include the operating system, hardware abstraction layer (Hal) and drivers.
[0104] The operating system includes: memory, tasks (UI thread, Display thread), interrupts (TE interrupt, ER interrupt). The operating system can report interrupt processing, where the reporting frequency of TE interrupt is a scheduled 60hz, and ER interrupt is reported every time the image is sent to the screen. After the operating system receives the message sent by the UI adaptation layer to the UI thread, the callback function that supports the UI thread will call the UIKIT framework to execute the rendering process. After the operating system receives the message sent by the UI adaptation layer to the Display thread, the callback function that supports the Display thread will execute copying and sending of images. Among them, the buffers all belong to the memory space.
[0105] The hardware abstraction layer (Hal) may include LCD (screen hardware abstraction layer) and graphics processor (GPU) abstract interfaces. After receiving a call request to execute the rendering process, the UIKIT framework sends a message to the hardware abstraction layer and calls the GPU abstract interface for rendering.
[0106] The driver may include LCD (screen display driver) and graphics processor driver. After receiving the image sending message, the hardware abstraction layer calls the screen display driver to send the image. After receiving the GPU call message, the hardware abstraction layer calls the GPU driver.
[0107] In a page display method provided in an embodiment of the present application, before the page slides, there may be two situations for the controls in the page, one is that they are completely displayed in the page, and the other is that they are partially displayed in the page. The embodiment of the present application has different processing methods for controls in different states. It is understandable that a page is usually composed of multiple controls, and the controls here refer to view controls.
[0108] The page display method provided by the embodiment of the present application is described in detail below. Figure 5 As shown, the specific steps include S501-S503.
[0109] S501. When the screen displays a first page, the electronic device takes a screenshot of a first control in the first page in response to a sliding operation on the screen to obtain a first picture.
[0110] The electronic device may detect a sliding operation of a user's finger on the first page, and in response to the sliding operation, take a screenshot of the first control to obtain a first picture.
[0111] Among them, the first control here refers to a control whose rendering efficiency is less than a preset threshold. Among them, the first control can be, for example, a semicircular arc control. When drawing, it is necessary to calculate according to a mathematical formula, and each point must be calculated according to the center of the circle and the radius. And when drawing, the arc is filled in sequence by one line at a time, which is very inefficient. Or the first control can be a text control, and each word must be drawn separately. If the control contains a large number of words, the GPU must be called multiple times, and the efficiency is also very low. Or the first control can be a control including hundreds of points or hundreds of lines, which also requires multiple calls to the GPU. Similar to the above controls, if the entire control is rendered, it takes a long time and the rendering efficiency is relatively low.
[0112] In the embodiment of the present application, the rendering efficiency of each control can be obtained in advance in the electronic device, and the controls with rendering efficiency less than a preset threshold can be recorded in advance, for example, stored in a table. In this way, each time a screenshot is taken in response to a user's operation, the control with a relatively low rendering efficiency can be directly identified from the stored table and a screenshot can be taken.
[0113] The above rendering operation is performed in a buffer (set as a first buffer), and the image information obtained after rendering can also be stored in the first buffer. The first buffer here is a memory block on the electronic device, and the image generated by the screenshot can also be stored in other memory blocks on the electronic device.
[0114] In an embodiment of the present application, the first control may be a control that is entirely within the screen. It is understandable that the screen of the electronic device is the same size as the display page. For this type of control, when the first buffer includes rendered image information corresponding to the first page, the electronic device performs a screenshot process on the first image information in the first buffer to obtain a first picture. The first image information here is the rendered image information corresponding to the first control in the first buffer.
[0115] The first control may also be a control that exceeds the size of the screen. For this type of control, the first control may be divided into a preset number of control units; wherein the size of the control unit does not exceed the screen of the electronic device. The electronic device may move the image information corresponding to the position of each control unit to the first buffer in sequence, render the image information corresponding to the control unit respectively, and obtain the rendered third image information. The electronic device takes screenshots of the plurality of third image information to obtain a plurality of second images, and the plurality of second images include screenshots of a preset number of control units. Finally, the plurality of second images are spliced according to the corresponding positions of the control units of the first control to obtain the final first image.
[0116] That is to say, it is possible to take screenshots of multiple third image information separately, then the number of screenshots is the preset number. It is also possible to take screenshots of more than one third image information at the same time, then the number of screenshots is less than the preset number. For example, the electronic device divides the first control into 6 control units, the size of a single control unit does not exceed the screen of the electronic device, and the size of the two control units does not exceed the screen of the electronic device. Then, it is possible to take screenshots of 2 third image information at the same time, then the number of screenshots is 3.
[0117] The first control may also be a control that is located beyond the screen and only partially displayed on the screen. For such controls, all image information corresponding to the first control may be moved to the first buffer. The electronic device renders the image information corresponding to the first control in the first buffer to obtain rendered second image information. The electronic device takes a screenshot of the second image information to obtain the first image.
[0118] In an embodiment of the present application, before the electronic device moves the image information corresponding to the first control or the image information corresponding to the control unit to the first buffer, the electronic device cleans up the information of the target area in the first buffer. The target area is the same size as the first control or the control unit. After the information of the target area in the first buffer is cleaned up, the image information corresponding to the first control or the image information corresponding to the control unit moved to the target area will not be affected.
[0119] After taking a screenshot of the first control on the first page to obtain the first picture, the electronic device restores the image information before the target area information is cleaned to obtain the restored image information, and the electronic device at least renders the restored image information. In other words, the state of the image information stored in the first buffer before the move is restored. Alternatively, the electronic device may redisplay the first page, that is, refresh the page once.
[0120] If the first control includes multiple controls, screenshots can be taken for each of the multiple controls and the screenshots can be saved separately. During the sliding process, the position of the control may change, but the control will still be displayed. Therefore, after taking a screenshot, it can be repeatedly applied to subsequent display processes. Only the screenshot needs to be rendered, and the controls do not need to be repeatedly rendered, which can improve rendering efficiency.
[0121] S502. The electronic device displays a second page during page sliding, where the second page includes an image rendered from the first image.
[0122] In the embodiment of the present application, during the page sliding process, the page will be refreshed and displayed in real time. It is understandable that the image in the page changes frame by frame, and each frame of the image will be rendered at a certain frame rate. During the page sliding process, the electronic device will re-render the control whose position has changed based on the sliding trajectory of the control, and the updated image will be displayed in the page. During the page sliding process, if the position of a control in the page changes, then each frame of the image displayed will be different from the previous frame.
[0123] The electronic device includes a first buffer, and during the page sliding process, the electronic device renders a first image generated by a screenshot in the first buffer to obtain rendered image information, and then displays a second page on the screen of the electronic device based on the rendered image information. In other words, the displayed second page includes an image rendered from the first image.
[0124] In an embodiment of the present application, the electronic device also includes a second buffer, and the second buffer can receive the rendered first image sent by the first buffer, and send the image for display. Specifically, the electronic device sends the rendered first image from the first buffer to the second buffer, and sends the rendered first image to the screen of the electronic device through the second buffer. The screen of the electronic device displays the second page based on the rendered first image. By implementing rendering and sending images in double buffering, the efficiency of page rendering can be higher and the frame rate can be improved.
[0125] In an embodiment of the present application, the electronic device determines the effective image information of the first picture after rendering; wherein the position corresponding to the effective image information is within the screen range. The screen of the electronic device displays a second page based on the effective image information. In other words, the portion displayed on the screen is determined based on the real-time position of the first control during the sliding process, and then the corresponding portion of the first picture is rendered to obtain the rendered effective image information.
[0126] In the embodiment of the present application, the first page includes multiple controls, and the multiple controls include a first control and a second control. The second control does not need to be screenshot processed, and the rendering efficiency of the second control is greater than the preset rendering efficiency, which means that the rendering efficiency of the second control is also greater than the rendering efficiency of the first control.
[0127] Then, the second page displayed during the page sliding process includes an image rendered from the first picture and an image rendered from the second control.
[0128] During the page sliding process, the electronic device renders the first picture generated by the screenshot and the controls in the page except the first control in the first buffer to obtain the rendered image information. Then the rendered image information is copied to the second buffer and displayed on the screen page. Since the rendering of an image only requires calling the GPU interface once, the rendering efficiency is very high compared to directly rendering the first control in the page. In addition, the rendering efficiency of controls other than the first control is relatively high. The GPU renders the above-mentioned controls with relatively high rendering efficiency, which can speed up the GPU rendering speed, shorten the rendering time of each frame of the page as a whole, improve the page refresh frame rate of the electronic device, and overcome the problem of page sliding jams.
[0129] During the page sliding process, since what is displayed is the image displayed after rendering the first image, rather than the first control itself displayed after rendering the data of the first control, the electronic device does not receive the user's operation on the first control.
[0130] S503. In response to the end of the sliding operation, the electronic device displays a third page; wherein the third page includes an image rendered from the first control.
[0131] In the embodiment of the present application, after the electronic device detects that the sliding operation is completed, the electronic device will release the corresponding first image and use the first control itself to render. Specifically, the electronic device can obtain the fourth image information rendered by the first control, and replace the first image in the image information corresponding to the last second page with the fourth image information to obtain the above-mentioned third page.
[0132] After the electronic device detects that the page sliding is finished, the third page displayed at this time is rendered by the data corresponding to the control in the page to be displayed, and the rendered image information is copied from the first buffer to the second buffer for display. The end of the sliding operation can be detected by the electronic device detecting that the user's finger is lifted. In other words, in the page rendering process after the sliding operation is finished, the data corresponding to the first control itself is rendered, and the first image is no longer rendered.
[0133] The image size corresponding to the frame image data stored in the first buffer corresponds to the size of the screen. If the screen is a square screen, the size of the image corresponding to the frame image data stored in the first buffer is the same as the size of the screen. If the screen is a round screen, the size of the image corresponding to the frame image data stored in the first buffer can be a square size that can just accommodate the entire screen. The buffer is actually a memory block. Generally speaking, the shape of the buffer is square.
[0134] The electronic device releases the first image of the first control, that is, deletes the first image in the memory. At this time, the first control can update its own data and save memory. In some embodiments, the first image in the memory can also be deleted after the page is exited. For example, if the first control is a text control whose text content does not change, then after the electronic device detects that the page sliding is over, the first image does not need to be released first. The electronic device can render the first control by rendering the first image during the subsequent page sliding process.
[0135] The specific processing methods for different types of first control screenshots are introduced below.
[0136] See also Figure 6 , Figure 6 This is a screenshot of a local control. Figure 6 As shown, in screen 601, view control 1 only occupies a part of screen 601, and view control 1 here is a local control.
[0137] When the electronic device responds to the user's sliding operation on the screen page (set as the first page), a picture of the view control 1 is captured in the first buffer. Before performing the screenshot operation, the electronic device obtains the rendering efficiency corresponding to each control that constitutes the page. The control whose rendering efficiency is less than the preset threshold is taken as the control to be screenshotted, that is, Figure 6 In the current page, the only control whose rendering efficiency is less than the preset threshold is view control 1.
[0138] It is assumed that the electronic device includes two buffers. Since the GPU renders the control in the first buffer, when the electronic device responds to the user's sliding operation on the screen page, it takes a screenshot of the view control 1 in the first buffer. In fact, it takes a screenshot of the rendered image information corresponding to the view control 1. After the screenshot operation, a first picture is obtained, which can be saved in the memory of the electronic device.
[0139] In the process of sliding the page, the electronic device can obtain the real-time position of the control on the screen in each frame of the image according to the sliding track, and each rendering is performed according to the corresponding position of the control in the first buffer. If it is view control 1, the first image is rendered at the corresponding position of the first buffer. If it is other controls in the page, the information to be rendered of the control is rendered at the corresponding position of the first buffer. Then, the rendered image information of the page to be displayed is combined, and the rendered image information is copied from the first buffer to the second buffer to display the new page on the screen.
[0140] Therefore, by only taking screenshots of image information corresponding to controls with lower rendering efficiency, the memory overhead in actual usage scenarios can be reduced.
[0141] See also Figure 7 , Figure 7 is a screenshot diagram of an overlong control. View control 2 is a control in the current page whose rendering efficiency is less than a preset threshold. Figure 7 As shown, in screen 701, the view control 2 exceeds the size of the screen, which may be, for example, a long text description page. Then, the first buffer 702 corresponding to the screen cannot accommodate all the control content. In this case, multiple screenshots can be stitched together to achieve long page screenshots. The specific steps are as follows:
[0142] When the electronic device responds to the user's sliding operation on the screen page, the position of the control to be screenshotted is moved to the upper left corner of the screen, and the image information corresponding to the control part in the screen area size is screenshotted and then temporarily saved. Figure 7 The screen in the example is a round screen, and the first buffer corresponds to the screen, that is, the position of the view control 2 is moved to the upper left corner of the first buffer, and the image information corresponding to the part of the view control 2 in the first buffer area is captured for the first time. This application does not limit the position to which the control is to be moved, which can be the upper left corner of the first buffer, the upper right corner, the lower right corner, etc., or other positions in the first buffer.
[0143] Then, if Figure 7 As shown, the captured part is removed to the upper half of the first buffer, and a second screenshot is taken of the image information corresponding to the remaining part of the view control 2.
[0144] At this point, the electronic device has captured all the image information corresponding to the view control 2 in the first buffer. Then, the image generated after the first screenshot and the image generated after the second screenshot are spliced and saved as a complete image. In the subsequent interaction process of the entire interface, this complete image is used for drawing and rendering. Figure 7 The dotted area shown is a complete picture.
[0145] The number of screenshots can be determined according to the size of the control. The more the control exceeds the screen, the more screenshots will be taken.
[0146] Before moving the divided control part to the corresponding position for screenshot, the original image information of the corresponding area of the position should be cleared. Then the control is moved to the corresponding position for rendering, and the image information obtained after the rendering is screenshotted. After the screenshot is completed, the page should be restored, that is, the control at the above position is rendered again, so that the image information saved in the second buffer will remain unchanged.
[0147] In some embodiments, before moving the divided control parts to the corresponding positions for screenshots, all image information in the second buffer can be cleared first. Then, the control parts are moved to the corresponding positions for rendering, and the image information obtained after the rendering process is screenshotted. After all the control parts are screenshotted, the page data before the move is obtained in the second buffer for re-rendering. Here, the page data before the move also includes the view control 2, so when re-rendering, the view control 2 can be rendered with the image corresponding to the view control 2.
[0148] Therefore, if there is an extremely long control with relatively low efficiency, taking a screenshot of the image information corresponding to the extremely long control can optimize the rendering frame rate of the control that exceeds one screen during the page sliding process, thereby improving the rendering frame rate of the entire page.
[0149] See also Figure 8 , Figure 8 The following is a screenshot of some display controls. Figure 8 As shown, view control 3 is a control in the current page whose rendering efficiency is less than a preset threshold. Figure 8 As shown, in screen 801, the position of view control 3 exceeds the screen, and only part of it is displayed in the screen page. At this time, the view control 3 can be moved to the screen and then the view control 3 is taken a screenshot.
[0150] Before moving the view control 3 to the corresponding position for screenshot, the original image information of the area corresponding to the position should be cleared. Then the view control 3 is moved to the corresponding position for rendering, and the image information obtained after the rendering is screenshotted. After the screenshot is completed, the current page should be restored, that is, the control at the above position is rendered again, so that the image information saved in the first buffer will remain unchanged.
[0151] In summary, a page display method in an embodiment of the present application can take a screenshot of a page control with a relatively low rendering efficiency in a buffer when the page is sliding, and then use the screenshot image to render together with the remaining controls in the page during the sliding process, and release the rendered image after the sliding is completed, and display it together with the rendered part of the original page as the page after sliding. This solution can improve the efficiency of the sliding process and reduce the problem of frame jamming during sliding.
[0152] The present application also provides a chip system, such as Fig. 9As shown, the chip system 1200 includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 1202 can be used to send signals to other devices (such as processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the electronic device can perform the various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0153] An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.
[0154] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.
[0155] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0156] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0157] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0160] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A page display method, characterized in that: Applied to an electronic device, the electronic device includes a screen and a first buffer zone, the method includes: In a case where the screen displays a first page, in response to a sliding operation on the screen, when the first buffer includes rendered image information corresponding to the first page, the electronic device performs screenshot processing on the first image information in the first buffer to obtain a first picture; wherein the first image information is rendered image information corresponding to a first control in the first buffer; wherein the rendering efficiency of the first control is less than a preset threshold; The electronic device displays a second page during page sliding, and the second page includes an image rendered from the first picture.
2. The method according to claim 1, characterized in that The electronic device performs screenshot processing on the first image information in the first buffer to obtain a first picture, including: When the position of the first control exceeds the screen of the electronic device, the electronic device moves the image information corresponding to the first control to the first buffer; The electronic device renders the image information corresponding to the first control in the first buffer to obtain rendered second image information; The electronic device performs screenshot processing on the second image information to obtain the first image.
3. The method according to claim 1 or 2, characterized in that: The electronic device performs screenshot processing on the first image information in the first buffer to obtain a first picture, including: In the case that the size of the first control exceeds the screen of the electronic device, the electronic device divides the first control into a preset number of control units; wherein the size of the control unit does not exceed the screen of the electronic device; The electronic device moves the image information corresponding to the position of each control unit to the first buffer, and renders the image information corresponding to the control unit to obtain rendered third image information; The electronic device takes screenshots of the plurality of third image information to obtain a plurality of second pictures, wherein the plurality of second pictures include screenshots of the preset number of control units; The electronic device splices the multiple second pictures to obtain the first picture.
4. The method according to claim 3, characterized in that Before the electronic device moves the image information corresponding to the first control or the image information corresponding to the control unit to the first buffer, the method further includes: The electronic device cleans up information in a target area in the first buffer; wherein the target area has the same size as the first control or the control unit; Wherein, after taking a screenshot of the first control on the first page to obtain the first picture, the method further includes: The electronic device restores the image information before the target area information is cleared to obtain restored image information, and the electronic device at least performs rendering processing on the restored image information; or The electronic device redisplays the first page.
5. The method according to claim 2 or 4, characterized in that: The electronic device further includes a second buffer, and the electronic device displays a second page during the page sliding process, including: The electronic device sends the rendered first picture from the first buffer to the second buffer, and sends the rendered first picture to the screen of the electronic device through the second buffer; The screen of the electronic device displays the second page based on the rendered first image.
6. The method according to claim 5, characterized in that The screen of the electronic device displays the second page based on the rendered first image, including: The electronic device determines valid image information of the rendered first picture; wherein a position corresponding to the valid image information is within the screen range; The second page is displayed on the screen of the electronic device based on the valid image information.
7. The method according to any one of claims 1, 2, 4 and 6, characterized in that: The first page also includes a second control, and the second page includes an image rendered from the first picture and an image rendered from the second control.
8. The method according to claim 7, characterized in that The method also includes: a rendering efficiency of the second control is greater than a rendering efficiency of the first control.
9. The method according to any one of claims 1, 2, 4, 6 and 8, characterized in that: After the electronic device displays the second page during the page sliding process, the method further includes: In response to the end of the sliding operation, the electronic device displays a third page; wherein the third page includes an image rendered from the first control.
10. The method according to claim 9, characterized in that The electronic device obtains fourth image information rendered by the first control; The electronic device replaces the first picture in the image information corresponding to the last second page with the fourth image information to obtain the third page.
11. An electronic device, characterized in that: The electronic device comprises: a communication module, a display screen, a memory and one or more processors; the communication module, the display screen, the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code comprises computer instructions, and when the computer instructions are executed by the electronic device, the electronic device executes the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed in an electronic device, the electronic device executes the method according to any one of claims 1 to 10.
