# US 12,112,400 B2 · Page drawing control method, apparatus, and device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,112,400 B2
- Document ID: US12112400B2
- Status: Granted
- Kind: B2
- Application number: 17/622,650
- Filed: 2020-06-24
- Published: 2022-11-10
- Granted: 2024-10-08
- Earliest claimed: 2019-06-27
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Wei Tan; Tanqi Yu; Qucheng Zhi; Yu Li
- Web page: https://patentgrep.com/patent/US12112400B2

## CPC

- G06T 11/00: Two-dimensional [2D] image generation
- G06F 9/451: Execution arrangements for user interfaces
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of this application provide a page drawing control method, apparatus, and device. The method includes: obtaining a drawing instruction for a first page, where the drawing instruction is used to instruct to draw the first page, the first page includes a first control, and the first control includes at least one child control; and if it is determined that an image corresponding to the first control exists and the first control and the child control in the first control are not updated, drawing the first control based on the image corresponding to the first control, or if it is determined that an image corresponding to the first control does not exist or the first control or the child control in the first control is updated, generating the image corresponding to the first control and drawing the first control. In this way, page drawing efficiency is improved.

## Claims

### Claim 1

A method, comprising:
obtaining a drawing instruction for a first page, wherein the drawing instruction is used to instruct to draw the first page, the first page comprises a first control, and the first control comprises at least one child control; and
in response to it is determined that an image corresponding to the first control exists and the first control and all the child controls in the first control are not updated, drawing the first control based on the image corresponding to the first control,
in response to it is determined that an image corresponding to the first control does not exist or the first control or the at least one child control in the first control is updated, generating the image corresponding to the first control and drawing the first control, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control;
obtaining a display list of the first control, wherein the display list comprises a drawing command for the first control and a drawing command for each child control in the first control; and
drawing the first control based on the display list.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the drawing the first control based on the image corresponding to the first control comprises:
generating an image drawing command corresponding to the image;
updating a drawing command in the display list of the first control to the image drawing command; and
drawing the first control based on an updated display list of the first control.

### Claim 3 (depends on 1)

The method of claim 1, wherein the generating the image corresponding to the first control comprises:
obtaining attribute information of the first control, wherein the attribute information comprises at least one of a size of the first control, a size of each child control in the first control, or a location of each child control in the first control; and
obtaining, based on at least one of the attribute information or a preset draw function, the image corresponding to the first control.

### Claim 4 (depends on 1)

The method of claim 1, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control, and drawing the first control based on the generated image corresponding to the first control.

### Claim 5 (depends on 1)

The method of claim 1, wherein
determining that the first control and all the child controls in the first control are not updated comprises:
in response to a state of the first control is a first state, determining that the first control and all the child controls in the first control are not updated; and
determining that the first control or the at least one child control in the first control is updated comprises:
in response to the state of the first control is a second state, determining that the first control or the at least one child control in the first control is updated.

### Claim 6 (depends on 5)

The method of claim 5, wherein the method further comprises:
after it is detected that the first control or the at least one child control in the first control is updated, setting the state of the first control to the second state; and
after the generating the image corresponding to the first control, the method further comprises:
setting the state of the first control to the first state.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first control is a viewgroup control, and the child control in the first control is a view control.

### Claim 8

An electronic device, comprising a memory and a processor, wherein the processor executes program instructions in the memory, so that the electronic device is enabled to perform following operations:
obtaining a drawing instruction for a first page, wherein the drawing instruction is used to instruct to draw the first page, the first page comprises a first control, and the first control comprises at least one child control; and
in response to it is determined that an image corresponding to the first control exists and the first control and all the child controls in the first control are not updated, drawing the first control based on the image corresponding to the first control,
in response to it is determined that an image corresponding to the first control does not exist or the first control or the at least one child control in the first control is updated, generating the image corresponding to the first control and drawing the first control, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control;
obtaining a display list of the first control, wherein the display list comprises a drawing command for the first control and a drawing command for each child control in the first control; and
drawing the first control based on the display list.

### Claim 9 (depends on 8)

The electronic device of claim 8, wherein the drawing the first control based on the image corresponding to the first control comprises:
generating an image drawing command corresponding to the image;
updating a drawing command in the display list of the first control to the image drawing command; and
drawing the first control based on an updated display list of the first control.

### Claim 10 (depends on 8)

The electronic device of claim 8, wherein the generating the image corresponding to the first control comprises:
obtaining attribute information of the first control, wherein the attribute information comprises at least one of a size of the first control, a size of each child control in the first control, or a location of each child control in the first control; and
obtaining, based on at least one of the attribute information or a preset draw function, the image corresponding to the first control.

### Claim 11 (depends on 8)

The electronic device of claim 8, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control, and drawing the first control based on the generated image corresponding to the first control.

### Claim 12 (depends on 8)

The electronic device of claim 8, wherein determining that the first control and all the child controls in the first control are not updated comprises:
in response to a state of the first control is a first state, determining that the first control and all the child controls in the first control are not updated, or
in response to a state of the first control is a second state, determining that the first control or the at least one child control in the first control is updated.

### Claim 13 (depends on 12)

The electronic device of claim 12, wherein the processor is further configured to:
after detecting that the first control or the child control in the first control is updated, set the state of the first control to the second state, and
after generating the image corresponding to the first control, set the state of the first control to the first state.

### Claim 14 (depends on 8)

The electronic device of claim 8, wherein the first control is a viewgroup control, and the child control in the first control is a view control.

### Claim 15

A non-transitory computer-readable storage medium having program instructions stored therein, which when executed by a processor, cause the processor to perform operations, the operations comprising:
obtaining a drawing instruction for a first page, wherein the drawing instruction is used to instruct to draw the first page, the first page comprises a first control, and the first control comprises at least one child control; and
in response to it is determined that an image corresponding to the first control exists and the first control and all the child controls in the first control are not updated, drawing the first control based on the image corresponding to the first control,
in response to it is determined that an image corresponding to the first control does not exist or the first control or the at least one child control in the first control is updated, generating the image corresponding to the first control and drawing the first control, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control;
obtaining a display list of the first control, wherein the display list comprises a drawing command for the first control and a drawing command for each child control in the first control; and
drawing the first control based on the display list.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the drawing the first control based on the image corresponding to the first control comprises:
generating an image drawing command corresponding to the image;
updating a drawing command in the display list of the first control to the image drawing command; and
drawing the first control based on an updated display list of the first control.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the generating the image corresponding to the first control comprises:
obtaining attribute information of the first control, wherein the attribute information comprises at least one of a size of the first control, a size of each child control in the first control, or a location of each child control in the first control; and
obtaining, based on at least one of the attribute information or a preset draw function, the image corresponding to the first control.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the generating the image corresponding to the first control and drawing the first control comprises:
generating the image corresponding to the first control, and drawing the first control based on the generated image corresponding to the first control.
