Android Canvas Rendering via OpenGL ES GPU Acceleration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing browser implementations for 2D Canvas drawing in HTML5 rely on CPU for both drawing and mixing steps, resulting in low efficiency and inadequate use of GPU hardware acceleration.

Innovation Solution

Implementing a method and apparatus that utilize the Android system's local window rendering mechanism and OpenGL ES API to perform Canvas element rendering on GPU hardware, converting 2D Canvas drawing APIs to OpenGL ES APIs through the Skia GPU function library, and copying rendered elements to active windows using GPU mapping operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If CPU-based 2D drawing library is used for Canvas rendering, then implementation simplicity is maintained, but rendering efficiency deteriorates due to lack of GPU hardware acceleration

Engineering Contradiction:
Improverendering efficiencyVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces the CPU-based mechanical drawing process with GPU-based hardware acceleration. Specifically, it substitutes the traditional CPU-executed 2D drawing library with OpenGL ES API calls that leverage the GPU's parallel processing capabilities, thereby dramatically improving rendering efficiency while accepting increased implementation complexity.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent introduces the Skia GPU function library as an intermediary layer between the Canvas rendering context and the OpenGL ES API. This mediator translates high-level Canvas drawing operations into GPU-accelerated OpenGL commands, enabling efficient GPU utilization while maintaining a relatively simple implementation interface for developers.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If CPU handles both drawing and mixing steps, then system simplicity is maintained, but processing speed deteriorates due to insufficient hardware utilization

Engineering Contradiction:
Improvedrawing speedVSAvoidsystem architecture complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent replaces the sequential CPU-based drawing and mixing process with parallel GPU-based operations. By utilizing the GPU's hardware capabilities for both drawing and compositing operations, the system achieves significant speed improvements while requiring a more complex architecture that integrates EGL, OpenGL ES, and Skia libraries.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Productivity

If software acceleration is used for 3D processing, then hardware requirements are reduced, but processing performance deteriorates compared to hardware acceleration

Engineering Contradiction:
Improveprocessing throughputVSAvoidhardware dependency
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent substitutes software-based 3D processing with hardware-accelerated GPU rendering. By leveraging the GPU's dedicated 3D processing units and OpenGL ES API, the system achieves high-performance rendering that充分利用 hardware capabilities, accepting increased hardware dependency as a trade-off for superior processing throughput.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS10013503B2Canvas element rendering method and apparatus implemented on android system based on GPU
Publication Date: 2018.07.03 ALIBABA GROUP HOLDING LTD
  • US10013503B2 patent drawing
  • US10013503B2 patent drawing
  • US10013503B2 patent drawing

AI summary

Embodiments of the disclosure are directed to HTML5 Canvas element rendering methods implemented on an Android system based on GPU hardware. The methods may include after a rendering operation instruction for a Canvas element in an HTML5 web page is detected and an initialization operation is completed, converting an invoking instruction for a 2D Canvas drawing API into an invoking instruction for an OpenGL ES API through a Skia GPU function library; setting EGL Context created during the initialization operation as a current context of a thread where a rendering operation is located; rendering the Canvas element in an off-screen local window created during the initialization operation by using the GPU; and copying the rendered Canvas element to a current active window of a device from the off-screen local window by using a mapping operation function of the GPU. The methods, by making use of a local window rendering mechanism provided by an Android operating system and the OpenGL ES API, allow the Canvas element to be drawn and mixed by using the GPU, thereby improving the performance of Canvas rendering by using GPU hardware acceleration.