Patent ID: 11954787
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 4:
5. The method according to claim 1, wherein the rendering the foreground image, and setting a depth value of each pixel on a canvas comprises:
detecting a transparency value of an alpha channel of the pixel corresponding to the foreground image, wherein the transparency value indicates a transparency degree of the pixel corresponding to the foreground image; and
in response to determining that the transparency value is a value other than 0, writing a color value of the foreground image into a first location in a color buffer, and writing the first depth value into a second location in a depth buffer, wherein the first location is a location of a pixel that corresponds to the foreground image and that is in the color buffer, and the second location is a location of a pixel that corresponds to the foreground image and that is in the depth buffer.