WO2019170110A1 - Image rendering method and related product - Google Patents

Image rendering method and related product Download PDF

Info

Publication number
WO2019170110A1
WO2019170110A1 PCT/CN2019/077196 CN2019077196W WO2019170110A1 WO 2019170110 A1 WO2019170110 A1 WO 2019170110A1 CN 2019077196 W CN2019077196 W CN 2019077196W WO 2019170110 A1 WO2019170110 A1 WO 2019170110A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
image data
format
worker thread
graphic buffer
Prior art date
Application number
PCT/CN2019/077196
Other languages
French (fr)
Chinese (zh)
Inventor
舒茧
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019170110A1 publication Critical patent/WO2019170110A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the embodiment of the present application provides a picture drawing method and related products, which can solve the problem of the picture display, improve the speed of drawing the picture of the mobile terminal, and reduce the time taken for the picture drawing.
  • the embodiment of the present application provides a picture drawing method, which is applied to a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, Methods include:
  • the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • the processor is a control center for a smartphone that connects various portions of the entire smartphone using various interfaces and lines, by running or executing software programs and/or modules stored in memory 133, and recalling stored in memory 133. Data, perform various functions of the smartphone and process data to monitor the smartphone as a whole.
  • the processor may include one or more processing units, such as an integrated application processor AP and a baseband processor (also known as a baseband chip, baseband), etc., wherein the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the baseband processor primarily handles wireless communications. It can be understood that the above baseband processor may also not be integrated into the processor.
  • the memory 133 can be, for example, a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), and an electrically erasable memory.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • EEPROM Electrically erasable memory.
  • registers hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • the Android system includes a display system.
  • the architecture of the display system is as shown in FIG. 1C.
  • the display system includes an interface drawing service (SurfaceFlinger) and a graphic splicing program interface (OpenGL for Embedded Systems, OpenGL).
  • ES graphic splicing program interface
  • EGL interface EGL interface
  • localization window NativeWindow EGL interface
  • hardware abstraction layer Gralloc hardware abstraction layer
  • the SurfaceFlinger holds a GraphicPlane member variable to describe the display, and an instance of the display hardware DisplayHardware object.
  • OpenGL ES is an interface protocol, a general-purpose function library that needs to be "localized" on different platform systems - that is, it is associated with a window system on a specific platform to ensure that it works properly.
  • NativeWindow is the window that localizes OpenGL ES on the Android platform
  • the EGL interface is the intermediate adaptation translation layer for configuring the local window for OpengGL ES.
  • the embodiment of the present application provides a picture drawing method for a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread.
  • the worker thread writes the image data of the target picture to the graphics buffer Graphic Buffer; the worker thread encapsulates the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread; the GL thread
  • the image data of the Texture format is used to perform a drawing operation for the target picture.
  • the problem of the card display displayed in the picture is solved, which is beneficial to improving the speed of drawing the picture of the mobile terminal and reducing the time taken for drawing the picture.
  • the worker thread writes image data of the target picture into a graphics buffer, a Graphic Buffer.
  • the graphics splicing interface OpenGL ES is the OpenGL version for embedded systems.
  • the multi-picture display interface may be an annual photo display interface in the album, and the number of the photos may be ten sheets, one hundred sheets, one thousand sheets, etc., which are not limited herein.
  • the format of the plurality of data modules that complete the data writing operation is the Graphic Buffer image data recognized by the localization window NativeWindow, and then the Texture data format recognized by the GL thread, so in the data encapsulation process, as shown in FIG. 1C, first The Graphic Buffer image data is encapsulated into image data of the EGLImage format recognized by the intermediate adaptation translation layer EGL interface, and then the image data of the EGLImage format is encapsulated into a Texture data format recognized by the GL thread.
  • the mobile terminal masquerades the image data of the working thread to complete the data writing operation through the data encapsulation as the Texture data format that can be recognized by the GL thread, and tricks the GL thread to perform image drawing operation on the image data, which is beneficial to realize.
  • the thread-sharing operation of the data write operation and the image drawing operation solves the blocking problem of the GL thread.
  • the blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed.
  • the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation.
  • the successful separation effectively solves the problem of stuck in the picture drawing operation.
  • the worker thread sends an address identifier of the image data of the Texture format to the GL thread, and the address identifier is used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
  • the worker thread sends the address identifier of the image data encapsulated in the Texture format to the GL thread, so that the GL thread can conveniently find the image data to be drawn instead of sending the image data to the fixed data of the GL thread.
  • the address it helps to reduce data consumption and reduce power consumption.
  • the worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer.
  • the worker thread first creates the Graphic Buffer with the data amount matching in the write operation, instead of randomly creating the fixed size Graphic Buffer, which is beneficial to improve the utilization of the memory cache, and the Graphic Buffer is created by the worker thread. , further reducing the burden of the GL thread, effectively solving the blocking problem of the GL thread.

Abstract

Disclosed in the embodiments of the present application are an image rendering method and a related product. The method is used in a mobile terminal, the mobile terminal running a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, the method comprising: the working thread writes image data of a target image to a graphic buffer; the working thread encapsulates the image data written to the graphic buffer into a texture map texture format recognised by the GL thread; and the GL thread uses image data of said texture format to execute a rendering operation on a target image. The embodiments of the present application help solve the problem of image display jamming, improving the image rendering speed of the mobile terminal, and reducing the time consumption of image rendering.

Description

图片绘制方法及相关产品Picture drawing method and related products 技术领域Technical field
本申请涉及移动终端技术领域,具体涉及图片绘制方法及相关产品。The present application relates to the field of mobile terminal technologies, and in particular, to a picture drawing method and related products.
背景技术Background technique
随着移动终端(例如,智能手机)相关技术的快速发展,越来越多的应用被安装在移动终端中,如相机类应用、支付类应用等,其中,随着人们生活水平的提升,人们对相机类应用的使用越来越频繁。With the rapid development of related technologies of mobile terminals (for example, smart phones), more and more applications are installed in mobile terminals, such as camera applications, payment applications, etc., with the improvement of people's living standards, people The use of camera-like applications is becoming more frequent.
目前,在相机类应用中,人们对相册显示的性能需求越来越高,然而,当显示图片的数据量较大或者同时显示的图片较多时,如何提升图片的显示速度,解决图片的显示卡顿现象成为亟待解决的问题。At present, in camera applications, people have higher and higher performance requirements for album display. However, when the amount of data displayed on a picture is large or there are many pictures displayed at the same time, how to improve the display speed of the picture and solve the picture display card The phenomenon has become an urgent problem to be solved.
发明内容Summary of the invention
本申请实施例提供了图片绘制方法及相关产品,可以解决图片显示的卡顿问题,提高移动终端图片绘制的速度,减少图片绘制的耗时。The embodiment of the present application provides a picture drawing method and related products, which can solve the problem of the picture display, improve the speed of drawing the picture of the mobile terminal, and reduce the time taken for the picture drawing.
第一方面,本申请实施例提供一种图片绘制方法,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,所述方法包括:In a first aspect, the embodiment of the present application provides a picture drawing method, which is applied to a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, Methods include:
所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;The worker thread writes image data of the target picture to the graphics buffer Graphic Buffer;
所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;The worker thread encapsulates the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The GL thread uses image data of the Texture format to perform a drawing operation for the target picture.
第二方面,本申请实施例提供一种图片绘制装置,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,所述图片绘制装置包括写入单元、封装单元和执行单元,其中,In a second aspect, the embodiment of the present application provides a picture drawing apparatus, which is applied to a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, The picture drawing device includes a writing unit, a packaging unit, and an execution unit, wherein
所述写入单元,用于控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;The writing unit is configured to control the working thread to write image data of the target picture to the graphics buffer Graphic Buffer;
所述封装单元,用于控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;The encapsulating unit is configured to control the working thread to encapsulate the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
所述执行单元,用于控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The execution unit is configured to control the GL thread to use image data of the Texture format to perform a drawing operation for the target image.
第三方面,本申请实施例提供一种移动终端,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。In a third aspect, an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the foregoing memory, and are configured by the foregoing processing. Executing, the above program includes instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。In a fourth aspect, the embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the embodiment of the present application. Some or all of the steps described in either method.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可 以为一个软件安装包。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to perform the implementation as in the present application. Some or all of the steps described in any of the methods of the first aspect. The computer program product can be a software installation package.
附图说明DRAWINGS
下面将对本申请实施例所涉及到的附图作简单地介绍。The drawings referred to in the embodiments of the present application will be briefly described below.
图1A是本申请实施例提供的一种智能手机的结构示意图;1A is a schematic structural diagram of a smart phone according to an embodiment of the present application;
图1B是本申请实施例提供的一种智能手机的代码运行空间的示例图;1B is a diagram showing an example of a code running space of a smart phone according to an embodiment of the present application;
图1C是本申请实施例提供的一种安卓系统中显示系统的架构图;1C is a structural diagram of a display system in an Android system according to an embodiment of the present application;
图2是本申请实施例提供的一种图片绘制方法的流程示意图;2 is a schematic flowchart of a picture drawing method according to an embodiment of the present application;
图3是本申请实施例公开的一种图片绘制方法的流程示意图;3 is a schematic flow chart of a picture drawing method disclosed in an embodiment of the present application;
图4是本申请实施例公开的一种图片绘制方法的流程示意图;4 is a schematic flow chart of a picture drawing method disclosed in an embodiment of the present application;
图5是本申请实施例公开的一种移动终端的结构示意图;FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure;
图6A是本申请实施例公开的一种图片绘制装置的功能单元组成框图;FIG. 6A is a block diagram showing the functional units of a picture drawing apparatus disclosed in an embodiment of the present application; FIG.
图6B是本申请实施例公开的另一种图片绘制装置的功能单元组成框图。FIG. 6B is a block diagram showing the functional unit composition of another picture drawing apparatus disclosed in the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish different objects, and are not intended to describe a specific order. Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products, or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为移动终端。本发明实施例所涉及到的嵌入式操作系统是对硬件资源进行统一管理,并向用户提供业务接口的软件系统。The mobile terminal involved in the embodiments of the present application may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of user devices (User Equipment, UE), mobile station (MS), terminal device, and the like. For convenience of description, the devices mentioned above are collectively referred to as mobile terminals. The embedded operating system involved in the embodiments of the present invention is a software system that uniformly manages hardware resources and provides a service interface to users.
以移动终端中的智能手机为例,示例性的,图1A是本申请实施例提供了一种智能手机100的结构示意图,上述智能手机100包括:壳体110、触控显示屏120、主板130、电池140和副板150,主板130上设置有前置摄像头131、处理器132、存储器133、电源管理芯片134、射频系统135等,副板上设置有振子151、一体音腔152、VOOC闪充接口153。For example, FIG. 1A is a schematic structural diagram of a smart phone 100 according to an embodiment of the present application. The smart phone 100 includes a housing 110, a touch display screen 120, and a main board 130. The battery 140 and the sub-board 150 are provided with a front camera 131, a processor 132, a memory 133, a power management chip 134, a radio frequency system 135, etc., and the sub-board is provided with a vibrator 151, an integrated sound chamber 152, and a VOOC flash. Charge interface 153.
所述处理器是智能手机的控制中心,利用各种接口和线路连接整个智能手机的各个部分,通过运行或执行存储在存储器133内的软件程序和/或模块,以及调用存储在存储器133内的数据,执行智能手机的各种功能和处理数据,从而对智能手机进行整体监控。该处理器可包括一个或多个处理单元,如可集成应用处理器AP和基带处理器(又称为基带芯片、基带)等,其中,应用处理器主要处理操作系统、用户界面和应用程序等,基带处理器主要处理无线通信。可以理解的是,上述基带处理器也可以不集成到处理器中。该处理器例 如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The processor is a control center for a smartphone that connects various portions of the entire smartphone using various interfaces and lines, by running or executing software programs and/or modules stored in memory 133, and recalling stored in memory 133. Data, perform various functions of the smartphone and process data to monitor the smartphone as a whole. The processor may include one or more processing units, such as an integrated application processor AP and a baseband processor (also known as a baseband chip, baseband), etc., wherein the application processor mainly processes an operating system, a user interface, an application, and the like. The baseband processor primarily handles wireless communications. It can be understood that the above baseband processor may also not be integrated into the processor. The processor can be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and a field programmable gate. Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The above processors may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
所述存储器133可用于存储软件程序以及模块,处理器通过运行存储在存储器133的软件程序以及模块,从而执行智能手机的各种功能应用以及数据处理。存储器133可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据智能手机的使用所创建的数据等。此外,存储器133可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。该存储器133例如可以是随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质。The memory 133 can be used to store software programs and modules that execute various functional applications and data processing of the smartphone by running software programs and modules stored in the memory 133. The memory 133 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the smartphone or the like. Further, the memory 133 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The memory 133 can be, for example, a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory (EPROM), and an electrically erasable memory. Programmable EPROM (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
图1B是本申请实施例提供的一种智能手机的代码运行空间的示例图,目前智能手机等移动终端一般设置有程序运行空间,该程序运行空间包括用户空间和操作系统空间,其中,用户空间运行有一个或多个应用程序,该一个或多个应用程序为移动终端安装的第三方应用程序,操作系统空间运行有移动终端的操作系统。该移动终端具体可以运行安卓Android系统、苹果公司开发的移动操作系统iOS等,此处不做唯一限定。FIG. 1B is a diagram showing an example of a code running space of a smart phone provided by an embodiment of the present application. Currently, a mobile terminal such as a smart phone is generally provided with a program running space, where the program running space includes a user space and an operating system space, wherein the user space There are one or more applications running, the one or more applications are third-party applications installed for the mobile terminal, and the operating system space runs an operating system with the mobile terminal. The mobile terminal can specifically run the Android Android system, the mobile operating system iOS developed by Apple, etc., and is not limited herein.
以上述移动终端运行有Android系统为例,Android系统中包括显示系统,显示系统的架构如图1C所示,该显示系统包括界面绘制服务(SurfaceFlinger)、图形拼接程序接口(OpenGL for Embedded Systems,OpenGL ES)、EGL接口、本地化窗口NativeWindow和硬件抽象层Gralloc。其中,该SurfaceFlinger中持有一个GraphicPlane成员变量来描述显示屏,以及一个显示屏硬件DisplayHardware对象实例。OpenGL ES为一个接口协议,即一个通用的函数库,在不同的平台系统上需要被“本地化”——即把它与具体平台上的窗口系统建立起关联,这样才能保证它正常工作。其中,NativeWindow就是将OpenGL ES在Android平台上本地化的窗口,而EGL接口是为OpengGL ES配置本地窗口的中间适配翻译层。Taking the above-mentioned mobile terminal running Android system as an example, the Android system includes a display system. The architecture of the display system is as shown in FIG. 1C. The display system includes an interface drawing service (SurfaceFlinger) and a graphic splicing program interface (OpenGL for Embedded Systems, OpenGL). ES), EGL interface, localization window NativeWindow and hardware abstraction layer Gralloc. Among them, the SurfaceFlinger holds a GraphicPlane member variable to describe the display, and an instance of the display hardware DisplayHardware object. OpenGL ES is an interface protocol, a general-purpose function library that needs to be "localized" on different platform systems - that is, it is associated with a window system on a specific platform to ensure that it works properly. Among them, NativeWindow is the window that localizes OpenGL ES on the Android platform, and the EGL interface is the intermediate adaptation translation layer for configuring the local window for OpengGL ES.
一般设计中,以移动终端的相册显示的业务为例,在嵌入式系统中,相册的显示包括了相片数据的上传写入操作,相片的绘制操作,相片的显示操作等,其中,相片数据的上传写入操作,相片的绘制操作使用了OpenGL ES中的相关函数调用GL线程来实现,其中,当显示的相片数据量较大或者同时显示的相片数量较多等情况下,在通过OpenGL ES进行相片数据的上传写入操作时,会阻塞GL线程,导致相片显示出现严重的卡顿现象,而且显示的速度慢,并且,在动态修改已显示的相片时,需要将修改后的数据重新上传至OpenGL ES进行显示,进一步导致了GL线程的阻塞,其实,相片数据的上传写入操作可以不需要通过OpenGL ES中的函数,而是相片的绘制操作必须要使用到OpenGL ES中的相关函数,因此,针对这一情况,对相册显示的业务提出如下申请。In the general design, taking the business displayed by the photo album of the mobile terminal as an example, in the embedded system, the display of the photo album includes the uploading and writing operation of the photo data, the drawing operation of the photo, the display operation of the photo, etc., wherein the photo data is The upload operation is performed by using the related function in OpenGL ES to call the GL thread. In the case where the amount of photo data displayed is large or the number of photos displayed at the same time is large, it is performed by OpenGL ES. When the photo data is uploaded and written, the GL thread will be blocked, causing serious jamming of the photo display, and the display speed is slow. When the photo is dynamically modified, the modified data needs to be re-uploaded to The display of OpenGL ES further causes the blocking of the GL thread. In fact, the uploading and writing operation of the photo data does not need to pass the function in OpenGL ES, but the drawing operation of the photo must use the related function in OpenGL ES, so In response to this situation, the following application is made for the business displayed in the album.
针对上述情况,本申请实施例提出一种针对移动终端的图片绘制方法,移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,该方法中,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。解决了图 片显示的卡顿问题,有利于提高移动终端图片绘制的速度,并减少图片绘制的耗时。For the above situation, the embodiment of the present application provides a picture drawing method for a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread. The worker thread writes the image data of the target picture to the graphics buffer Graphic Buffer; the worker thread encapsulates the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread; the GL thread The image data of the Texture format is used to perform a drawing operation for the target picture. The problem of the card display displayed in the picture is solved, which is beneficial to improving the speed of drawing the picture of the mobile terminal and reducing the time taken for drawing the picture.
下面结合附图对本申请实施例进行介绍。The embodiments of the present application are described below with reference to the accompanying drawings.
请参阅图2,图2是本申请实施例提供了一种图片绘制方法的流程示意图,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,如图所示,本图片绘制方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a method for drawing a picture, which is applied to a mobile terminal, where the mobile terminal runs a GL thread invoked by a graphics splicing program interface OpenGL ES and the GL thread. The working thread outside, as shown in the figure, the drawing method of this picture includes:
S201,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer。S201. The worker thread writes image data of the target picture into a graphics buffer, a Graphic Buffer.
其中,图形拼接程序接口OpenGL ES为用于嵌入式系统的OpenGL版本。Among them, the graphics splicing interface OpenGL ES is the OpenGL version for embedded systems.
其中,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer的触发条件可以是多种多样的,例如可以是检测到任意程序针对任一图片的显示操作,或者可以是检测到相册应用针对某一图片的修改生成新图片的操作等,在此不做限定。The triggering condition that the working thread writes the image data of the target image into the graphic buffer of the graphic buffer may be various, for example, the display operation of any program may be detected for any image, or the album may be detected. The operation of generating a new picture for the modification of a certain picture is not limited herein.
其中,所述移动终端工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer之前,检测到针对所述目标图片的显示操作,并接收由上层应用程序发送的所述目标图片的图像数据,该图像数据的格式为位图文件Bitmap。The working thread of the mobile terminal detects the display operation for the target picture and the image data of the target picture sent by the upper application, before the image data of the target picture is written into the graphic buffer. The format of the image data is a bitmap file Bitmap.
其中,执行所述目标图片的图像数据写入Graphic Buffer操作的工作线程可以是一个,也可以是多个工作线程将图像数据分区域,共同执行图像数据的写入Graphic Buffer操作,在此不做限定。The working thread for executing the image data of the target picture to be written into the Graphic Buffer operation may be one, or multiple working threads may divide the image data into regions, and jointly perform the writing of the image data into the Graphic Buffer operation, and do not do this. limited.
其中,所述图像缓存区可以是由GL线程创建的,也可以是由工作线程创建的,在此不做唯一限定。The image buffer may be created by a GL thread, or may be created by a worker thread, and is not limited herein.
在一个可能的示例中,所述移动终端的前台运行有相册应用程序,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。In a possible example, the front end of the mobile terminal runs an album application, and the running interface of the photo album application includes a multi-image display interface, and the number of photos to be displayed in the multi-image display interface is greater than a preset number threshold. .
其中,所述前台运行有相册应用程序为当前显示屏显示的应用程序,以及当前用户正在操作的应用程序。The foreground is running an application that the photo album application displays for the current display screen, and an application that the current user is operating.
其中,所述多图显示界面可以为相册中的年度照片显示界面,照片的数量可以为十张,百张,千张等,在此不作限定。The multi-picture display interface may be an annual photo display interface in the album, and the number of the photos may be ten sheets, one hundred sheets, one thousand sheets, etc., which are not limited herein.
可见,本示例中,在移动终端前台运行相册应用程序,且运行界面包括多图显示界面时,使用该图片绘制方法,使用工作线程执行图像数据的写入操作,有利于提升多图片同时显示场景的显示速度,解决图片显示卡顿问题。It can be seen that, in this example, when the photo album application is run in the foreground of the mobile terminal, and the running interface includes the multi-image display interface, the image drawing method is used to execute the image data writing operation by using the working thread, which is beneficial to improving the multi-picture and simultaneously displaying the scene. The display speed, solve the picture shows the Karton problem.
S202,所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式。S202. The worker thread encapsulates the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread.
在一个可能的示例中,所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,包括:In one possible example, the worker thread encapsulates the image data written in the Graphic Buffer into a Texture Map Texture format recognized by the GL thread, including:
所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据;The worker thread encapsulates the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface;
所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有所述Texture格式的图像数据。The worker thread encapsulates the image data having the EGLImage format into image data having the Texture format recognized by the GL thread.
其中,完成数据写入操作的多个数据模块的格式为上述本地化窗口NativeWindow识别的Graphic Buffer图像数据,然后GL线程识别的Texture数据格式,因此在数据封装过程中,如图1C所示,首先将Graphic Buffer图像数据封装为中间适配翻译层EGL接口识别的EGLImage格式的图像数据,然后将EGLImage格式的图像数据封装为GL线程识别的Texture数据格式。Wherein, the format of the plurality of data modules that complete the data writing operation is the Graphic Buffer image data recognized by the localization window NativeWindow, and then the Texture data format recognized by the GL thread, so in the data encapsulation process, as shown in FIG. 1C, first The Graphic Buffer image data is encapsulated into image data of the EGLImage format recognized by the intermediate adaptation translation layer EGL interface, and then the image data of the EGLImage format is encapsulated into a Texture data format recognized by the GL thread.
可见,本示例中,移动终端通过将工作线程在NativeWindow完成数据写入操作的图像数据通过数据封装伪装为GL线程可以识别的Texture数据格式,骗取GL线程对图像数据进行图像绘制操作,有利于实现数据写入操作与图像绘制操作的分线程操作,解决了GL线程的 阻塞问题。It can be seen that, in this example, the mobile terminal masquerades the image data of the working thread to complete the data writing operation through the data encapsulation as the Texture data format that can be recognized by the GL thread, and tricks the GL thread to perform image drawing operation on the image data, which is beneficial to realize. The thread-sharing operation of the data write operation and the image drawing operation solves the blocking problem of the GL thread.
S203,所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。S203. The GL thread uses the image data of the Texture format to perform a drawing operation for the target picture.
其中,所述GL线程获取工作线程封装完成的Texture格式的图像数据,使用OpenGL ES中的专属函数对图像数据执行绘制操作。The GL thread obtains the image data of the Texture format encapsulated by the worker thread, and performs a drawing operation on the image data by using a dedicated function in the OpenGL ES.
可以看出,本申请实施例中,移动终端的工作线程首先将目标图片的图像数据写入图形缓存区Graphic Buffer,其次,工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,最后,GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。可知,由于数据写入操作不需要调用OpenGL ES来实现,因此,移动终端将耗时严重的数据写入操作从OpenGL ES调用的GL线程中分离出来,由其他工作线程来完成,改善了GL线程的阻塞问题,有利于提升GL线程的图片绘制速度,降低了图片绘制耗时,而且OpenGL ES调用GL线程对图像数据执行绘制操作时只能识别指定的Texture格式,因此,在数据写入操作完成之后,通过数据封装在不改变数据的情况下,将数据的数据格式改变为Texture格式,解决了在数据写入操作分离之后,实现图片绘制操作的问题,实现了数据写入操作与图片绘制操作的成功分离,有效解决了图片绘制操作的卡顿问题。It can be seen that, in the embodiment of the present application, the working thread of the mobile terminal first writes the image data of the target image into the graphics buffer, and second, the worker thread encapsulates the image data written in the Graphic Buffer into the The texture map texture format recognized by the GL thread, and finally, the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture. It can be seen that since the data write operation does not need to call OpenGL ES to implement, the mobile terminal separates the time-consuming data write operation from the GL thread called by OpenGL ES, and is completed by other worker threads, improving the GL thread. The blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed. After that, the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation. The successful separation effectively solves the problem of stuck in the picture drawing operation.
在一个可能的示例中,所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作之前,所述方法还包括:In one possible example, before the GL thread uses the image data of the Texture format to perform a drawing operation for the target image, the method further includes:
所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程,所述地址标识用于所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据。The worker thread sends an address identifier of the image data of the Texture format to the GL thread, and the address identifier is used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
可见,本示例中,工作线程将封装为Texture格式的图像数据的地址标识发送给GL线程,使GL线程可以便捷的找到需要绘制的图像数据,而不是将图像数据发送到GL线程固定使用的数据地址中,有利于减少数据量消耗,降低功耗。It can be seen that in this example, the worker thread sends the address identifier of the image data encapsulated in the Texture format to the GL thread, so that the GL thread can conveniently find the image data to be drawn instead of sending the image data to the fixed data of the GL thread. In the address, it helps to reduce data consumption and reduce power consumption.
在一个可能的示例中,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer,包括:In one possible example, the worker thread writes image data of the target picture to the graphics buffer, including:
所述工作线程获取格式为位图文件Bitmap的所述图像数据;The worker thread acquires the image data in a format of a bitmap file Bitmap;
所述工作线程创建与所述图像数据的数据量匹配的所述Graphic Buffer;The worker thread creates the Graphic Buffer that matches the amount of data of the image data;
所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer.
其中,所述图像数据的数据量越大,创建的图形缓存区越大,所述数据量与Graphic Buffer的大小的关系可以由开发工作人员在移动终端出厂前根据经验进行设定的。The larger the data volume of the image data is, the larger the graphics buffer area is created, and the relationship between the data volume and the size of the Graphic Buffer can be set by the development staff according to experience before leaving the factory.
可见,本示例中,工作线程在写入操作中首先自己创建于数据量匹配的Graphic Buffer,而不是随意创建固定大小的Graphic Buffer,有利于提升显存缓存的利用率,而且由工作线程创建Graphic Buffer,进一步降低了GL线程的负担,有效解决了GL线程的阻塞问题。It can be seen that in this example, the worker thread first creates the Graphic Buffer with the data amount matching in the write operation, instead of randomly creating the fixed size Graphic Buffer, which is beneficial to improve the utilization of the memory cache, and the Graphic Buffer is created by the worker thread. , further reducing the burden of the GL thread, effectively solving the blocking problem of the GL thread.
在一个可能的示例中,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer,包括:In one possible example, the worker thread writes image data of the target picture to the graphics buffer, including:
所述工作线程获取格式为位图文件Bitmap的所述图像数据;The worker thread acquires the image data in a format of a bitmap file Bitmap;
所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述GL线程创建的所述Graphic Buffer。The worker thread writes the image data in the format of the bitmap file Bitmap to the Graphic Buffer created by the GL thread.
可见,本示例中,工作线程将图像数据写入GL线程创建的所述Graphic Buffer,而不是由工作线程自主创建Graphic Buffer,减少了数据写入完成后GL线程查找数据的时间消耗,有利于提升后期GL线程绘制目标图片的速度。It can be seen that, in this example, the worker thread writes the image data to the Graphic Buffer created by the GL thread, instead of creating the Graphic Buffer by the worker thread, which reduces the time consumption of the GL thread to find the data after the data is written, which is beneficial to the improvement. The speed at which the GL thread draws the target image.
在一个可能的示例中,所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer,包括:In one possible example, the worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer, including:
所述工作线程对所述Graphic Buffer启动读写锁;The worker thread starts a read-write lock on the Graphic Buffer;
所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer;The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer;
所述工作线程关闭所述读写锁。The worker thread closes the read-write lock.
可见,本示例中,移动终端在调用线程将图像数据写入缓存区时,将该线程对应的缓存区域启动读写锁,仅仅针对该线程写入的数据的缓存区启动读写锁,有利于提升线程的数据写入成功率,在启动读写锁时并不是针对GL线程创建的整体缓存区域启动读写锁,对后期移动终端针对不同区域的数据进行修改时,而不需要对所有数据进行重新写入操作,有利于提升数据修改后的写入的速度。It can be seen that, in this example, when the calling terminal writes the image data into the buffer area, the mobile terminal starts the read-write lock for the cache area corresponding to the thread, and only starts the read-write lock for the buffer area of the data written by the thread, which is beneficial to the mobile terminal. Improve the data write success rate of the thread. When the read-write lock is started, the read-write lock is not started for the overall cache area created by the GL thread, and the data of the different mobile areas is modified for the later mobile terminal, without all data being required. The rewrite operation is beneficial to increase the speed of data modification after writing.
与上述图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种图片绘制方法的流程示意图,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程。如图所示,本图片绘制方法包括:FIG. 3 is a schematic flowchart of a picture drawing method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where the mobile terminal runs a graphic splicing program interface. The GL thread called by OpenGL ES and the worker thread other than the GL thread. As shown in the figure, the drawing method of this picture includes:
S301,所述工作线程获取格式为位图文件Bitmap的图像数据。S301. The worker thread acquires image data in a format of a bitmap file Bitmap.
S302,所述工作线程创建与所述图像数据的数据量匹配的图形缓存区Graphic Buffer。S302. The worker thread creates a graphics buffer, a Graphic Buffer, that matches the amount of data of the image data.
S303,所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。S303. The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer.
S304,所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据。S304. The worker thread encapsulates the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface.
S305,所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有Texture格式的图像数据。S305. The worker thread encapsulates the image data having the EGLImage format into image data having a Texture format recognized by the GL thread.
S306,所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程。S306. The worker thread sends an address identifier of the image data in the Texture format to the GL thread.
S307,所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据以执行针对目标图片的绘制操作。S307. The GL thread uses the image data of the Texture format according to the address obtained by identifying the address identifier to perform a drawing operation for the target picture.
可以看出,本申请实施例中,移动终端的工作线程首先将目标图片的图像数据写入图形缓存区Graphic Buffer,其次,工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,最后,GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。可知,由于数据写入操作不需要调用OpenGL ES来实现,因此,移动终端将耗时严重的数据写入操作从OpenGL ES调用的GL线程中分离出来,由其他工作线程来完成,改善了GL线程的阻塞问题,有利于提升GL线程的图片绘制速度,降低了图片绘制耗时,而且OpenGL ES调用GL线程对图像数据执行绘制操作时只能识别指定的Texture格式,因此,在数据写入操作完成之后,通过数据封装在不改变数据的情况下,将数据的数据格式改变为Texture格式,解决了在数据写入操作分离之后,实现图片绘制操作的问题,实现了数据写入操作与图片绘制操作的成功分离,有效解决了图片绘制操作的卡顿问题。It can be seen that, in the embodiment of the present application, the working thread of the mobile terminal first writes the image data of the target image into the graphics buffer, and second, the worker thread encapsulates the image data written in the Graphic Buffer into the The texture map texture format recognized by the GL thread, and finally, the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture. It can be seen that since the data write operation does not need to call OpenGL ES to implement, the mobile terminal separates the time-consuming data write operation from the GL thread called by OpenGL ES, and is completed by other worker threads, improving the GL thread. The blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed. After that, the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation. The successful separation effectively solves the problem of stuck in the picture drawing operation.
此外,工作线程在写入操作中首先自己创建于数据量匹配的Graphic Buffer,而不是随意创建固定大小的Graphic Buffer,有利于提升显存缓存的利用率,而且由工作线程创建Graphic Buffer,进一步降低了GL线程的负担,有效解决了GL线程的阻塞问题。In addition, the worker thread first creates a Graphic Buffer that matches the data amount in the write operation, instead of creating a fixed-size Graphic Buffer at will, which is beneficial to improve the utilization of the memory cache, and the Graphic Buffer is created by the worker thread, which further reduces the The burden of the GL thread effectively solves the blocking problem of the GL thread.
此外,移动终端通过将工作线程在NativeWindow完成数据写入操作的图像数据通过数据封装伪装为GL线程可以识别的Texture数据格式,骗取GL线程对图像数据进行图像绘制操作,有利于实现数据写入操作与图像绘制操作的分线程操作,解决了GL线程的阻塞问题,并且将封装为Texture格式的图像数据的地址标识发送给GL线程,使GL线程可以便捷的找到需要绘制的图像数据,而不是将图像数据发送到GL线程固定使用的数据地址中,有利于减少数据量消耗,降低功耗。In addition, the mobile terminal masquerades the image data of the working thread to complete the data writing operation through the data package as the Texture data format that can be recognized by the GL thread, and tricks the GL thread to perform image drawing operation on the image data, which is beneficial to the data writing operation. The thread-sharing operation with the image drawing operation solves the blocking problem of the GL thread, and sends the address identifier of the image data encapsulated in the Texture format to the GL thread, so that the GL thread can conveniently find the image data to be drawn instead of Image data is sent to the fixed data address of the GL thread, which helps to reduce data consumption and reduce power consumption.
与上述图2所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种图片绘制方法的流程示意图,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程。如图所示,本图片绘制方法包括:FIG. 4 is a schematic flowchart of a picture drawing method according to an embodiment of the present disclosure, which is applied to a mobile terminal, where the mobile terminal runs a graphic splicing program interface. The GL thread called by OpenGL ES and the worker thread other than the GL thread. As shown in the figure, the drawing method of this picture includes:
S401,当所述移动终端的前台运行有相册应用程序时,所述工作线程获取格式为位图文件Bitmap的图像数据。S401. When the foreground of the mobile terminal runs an album application, the worker thread acquires image data in a format of a bitmap file Bitmap.
其中,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。The running interface of the photo album application includes a multi-image display interface, and the number of photos to be displayed in the multi-image display interface is greater than a preset number threshold.
S402,所述GL线程创建图形缓存区Graphic Buffer,并将所述Graphic Buffer的地址标识发送给所述工作线程。S402. The GL thread creates a graphics buffer, and sends an address identifier of the Graphic Buffer to the worker thread.
S403,所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。S403. The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer.
S404,所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据。S404. The worker thread encapsulates the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface.
S405,所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有Texture格式的图像数据。S405. The worker thread encapsulates the image data having the EGLImage format into image data having a Texture format recognized by the GL thread.
S406,所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程。S406. The worker thread sends an address identifier of the image data in the Texture format to the GL thread.
S407,所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据以执行针对目标图片的绘制操作。S407. The GL thread uses the image data of the Texture format according to an address obtained by identifying the address identifier to perform a drawing operation for the target picture.
可以看出,本申请实施例中,移动终端的工作线程首先将目标图片的图像数据写入图形缓存区Graphic Buffer,其次,工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,最后,GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。可知,由于数据写入操作不需要调用OpenGL ES来实现,因此,移动终端将耗时严重的数据写入操作从OpenGL ES调用的GL线程中分离出来,由其他工作线程来完成,改善了GL线程的阻塞问题,有利于提升GL线程的图片绘制速度,降低了图片绘制耗时,而且OpenGL ES调用GL线程对图像数据执行绘制操作时只能识别指定的Texture格式,因此,在数据写入操作完成之后,通过数据封装在不改变数据的情况下,将数据的数据格式改变为Texture格式,解决了在数据写入操作分离之后,实现图片绘制操作的问题,实现了数据写入操作与图片绘制操作的成功分离,有效解决了图片绘制操作的卡顿问题。It can be seen that, in the embodiment of the present application, the working thread of the mobile terminal first writes the image data of the target image into the graphics buffer, and second, the worker thread encapsulates the image data written in the Graphic Buffer into the The texture map texture format recognized by the GL thread, and finally, the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture. It can be seen that since the data write operation does not need to call OpenGL ES to implement, the mobile terminal separates the time-consuming data write operation from the GL thread called by OpenGL ES, and is completed by other worker threads, improving the GL thread. The blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed. After that, the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation. The successful separation effectively solves the problem of stuck in the picture drawing operation.
此外,在移动终端前台运行相册应用程序,且运行界面包括多图显示界面时,使用该图片绘制方法,使用工作线程执行图像数据的写入操作,有利于提升多图片同时显示场景的显示速度,解决图片显示卡顿问题,而且将图像数据写入GL线程创建的所述Graphic Buffer,而不是由工作线程自主创建Graphic Buffer,减少了数据写入完成后GL线程查找数据的时间消耗,有利于提升后期GL线程绘制目标图片的速度。In addition, when the photo album application is run in the foreground of the mobile terminal, and the running interface includes the multi-image display interface, the image drawing method is used to execute the image data writing operation by using the working thread, which is beneficial to improving the display speed of the multi-picture simultaneous display scene. Solve the picture display card problem, and write the image data to the Graphic Buffer created by the GL thread, instead of creating the Graphic Buffer by the worker thread, which reduces the time consumption of the GL thread to find the data after the data is written, which is beneficial to improve The speed at which the GL thread draws the target image.
此外,移动终端通过将工作线程在NativeWindow完成数据写入操作的图像数据通过数据封装伪装为GL线程可以识别的Texture数据格式,骗取GL线程对图像数据进行图像绘制操作,有利于实现数据写入操作与图像绘制操作的分线程操作,解决了GL线程的阻塞问题,并且将封装为Texture格式的图像数据的地址标识发送给GL线程,使GL线程可以便捷的找到需要绘制的图像数据,而不是将图像数据发送到GL线程固定使用的数据地址中,有利于减少数据量消耗,降低功耗。In addition, the mobile terminal masquerades the image data of the working thread to complete the data writing operation through the data package as the Texture data format that can be recognized by the GL thread, and tricks the GL thread to perform image drawing operation on the image data, which is beneficial to the data writing operation. The thread-sharing operation with the image drawing operation solves the blocking problem of the GL thread, and sends the address identifier of the image data encapsulated in the Texture format to the GL thread, so that the GL thread can conveniently find the image data to be drawn instead of Image data is sent to the fixed data address of the GL thread, which helps to reduce data consumption and reduce power consumption.
与上述图2、图3、图4所示的实施例一致的,请参阅图5,图5是本申请实施例提供的 一种移动终端的结构示意图,该所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,而且,该移动终端运行有一个或多个应用程序和操作系统,如图所示,该移动终端包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序不同于上述一个或多个应用程序,且上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令;With reference to the embodiment shown in FIG. 2, FIG. 3, and FIG. 4, please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application, where the mobile terminal runs a graphics splicing program. a GL thread invoked by the interface OpenGL ES and a worker thread other than the GL thread, and the mobile terminal runs one or more applications and an operating system, as shown, the mobile terminal includes a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are different from the one or more applications, and the one or more programs are stored in the memory and configured to be executed by the processor The above program includes instructions for performing the following steps;
控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;Controlling the worker thread to write image data of the target picture to the graphics buffer Graphic Buffer;
控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;Controlling the worker thread to encapsulate the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The GL thread is controlled to use the image data of the Texture format to perform a drawing operation for the target picture.
可以看出,本申请实施例中,移动终端的工作线程首先将目标图片的图像数据写入图形缓存区Graphic Buffer,其次,工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,最后,GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。可知,由于数据写入操作不需要调用OpenGL ES来实现,因此,移动终端将耗时严重的数据写入操作从OpenGL ES调用的GL线程中分离出来,由其他工作线程来完成,改善了GL线程的阻塞问题,有利于提升GL线程的图片绘制速度,降低了图片绘制耗时,而且OpenGL ES调用GL线程对图像数据执行绘制操作时只能识别指定的Texture格式,因此,在数据写入操作完成之后,通过数据封装在不改变数据的情况下,将数据的数据格式改变为Texture格式,解决了在数据写入操作分离之后,实现图片绘制操作的问题,实现了数据写入操作与图片绘制操作的成功分离,有效解决了图片绘制操作的卡顿问题。It can be seen that, in the embodiment of the present application, the working thread of the mobile terminal first writes the image data of the target image into the graphics buffer, and second, the worker thread encapsulates the image data written in the Graphic Buffer into the The texture map texture format recognized by the GL thread, and finally, the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture. It can be seen that since the data write operation does not need to call OpenGL ES to implement, the mobile terminal separates the time-consuming data write operation from the GL thread called by OpenGL ES, and is completed by other worker threads, improving the GL thread. The blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed. After that, the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation. The successful separation effectively solves the problem of stuck in the picture drawing operation.
在一个可能的示例中,在控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式方面,所述程序中的指令具体用于执行以下操作:控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据;以及用于控制所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有所述Texture格式的图像数据。In one possible example, in controlling the worker thread to encapsulate the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread, the instructions in the program are specifically used to perform the following Operation: controlling the worker thread to encapsulate the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface; and controlling the worker thread to encapsulate the image data having the EGLImage format Image data having the Texture format identified for the GL thread.
在这个可能的示例中,上述程序还包括用于执行以下步骤的指令:控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作之前,控制所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程,所述地址标识用于所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据。In this possible example, the above program further includes instructions for: controlling the GL thread to control the worker thread before using the image data of the Texture format to perform a drawing operation for the target picture An address identifier of the image data of the Texture format is sent to the GL thread, and the address identifier is used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
在一个可能的示例中,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述程序中的指令具体用于执行以下操作:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程创建与所述图像数据的数据量匹配的所述Graphic Buffer;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。In one possible example, in controlling the worker thread to write image data of the target picture to the graphics buffer Graphic Buffer, the instructions in the program are specifically configured to: control the worker thread to acquire the format as a bit The image data of the map file Bitmap; and the Graphic Buffer for controlling the worker thread to match the data amount of the image data; and for controlling the worker thread to use the format as a bitmap file Bitmap The image data is written to the Graphic Buffer.
在一个可能的示例中,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述程序中的指令具体用于执行以下操作:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述GL线程创建的所述Graphic Buffer。In one possible example, in controlling the worker thread to write image data of the target picture to the graphics buffer Graphic Buffer, the instructions in the program are specifically configured to: control the worker thread to acquire the format as a bit And the image data of the map file Bitmap; and the graphic buffer for controlling the working thread to write the image data of the bitmap file Bitmap to the GL thread.
在一个可能的示例中,在控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer方面,所述程序中的指令具体用于执行以下操作:控制所述工作线程对所述Graphic Buffer启动读写锁;以及用于控制所述工作线程将所述格式为位图文件 Bitmap的图像数据写入所述Graphic Buffer;以及用于控制所述工作线程关闭所述读写锁。In one possible example, in controlling the worker thread to write the image data of the format bitmap file Bitmap to the Graphic Buffer, the instructions in the program are specifically configured to perform the following operations: controlling the work. Threading a read/write lock to the Graphic Buffer; and controlling the worker thread to write the image data of the format bitmap file Bitmap to the Graphic Buffer; and for controlling the worker thread to close the read Write a lock.
在一个可能的示例中,所述移动终端的前台运行有相册应用程序,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。In a possible example, the front end of the mobile terminal runs an album application, and the running interface of the photo album application includes a multi-image display interface, and the number of photos to be displayed in the multi-image display interface is greater than a preset number threshold. .
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above description mainly introduces the solution of the embodiment of the present application from the perspective of the method side execution process. It can be understood that, in order to implement the above functions, the mobile terminal includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art will readily appreciate that the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for each particular application to implement the described functionality, but such implementation should not be considered to be beyond the scope of the application.
本申请实施例可以根据上述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the functional unit into the mobile terminal according to the foregoing method example. For example, each functional unit may be divided according to each function, or two or more functions may be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
在采用集成的单元的情况下,图6A示出了上述实施例中所涉及的图片绘制装置的一种可能的功能单元组成框图。图片绘制装置600应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,所述图片绘制装置600包括写入单元601、封装单元602和执行单元603,其中,In the case of employing an integrated unit, FIG. 6A shows a block diagram of a possible functional unit composition of the picture drawing device involved in the above embodiment. The picture drawing device 600 is applied to a mobile terminal running a GL thread called by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, the picture drawing device 600 including a writing unit 601, and a package Unit 602 and execution unit 603, wherein
所述写入单元601,用于控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;The writing unit 601 is configured to control the working thread to write image data of the target picture to the graphics buffer Graphic Buffer;
所述封装单元602,用于控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;The encapsulating unit 602 is configured to control the working thread to encapsulate the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
所述执行单元603,用于控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The executing unit 603 is configured to control the GL thread to use the image data of the Texture format to perform a drawing operation for the target picture.
可以看出,本申请实施例中,移动终端的工作线程首先将目标图片的图像数据写入图形缓存区Graphic Buffer,其次,工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,最后,GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。可知,由于数据写入操作不需要调用OpenGL ES来实现,因此,移动终端将耗时严重的数据写入操作从OpenGL ES调用的GL线程中分离出来,由其他工作线程来完成,改善了GL线程的阻塞问题,有利于提升GL线程的图片绘制速度,降低了图片绘制耗时,而且OpenGL ES调用GL线程对图像数据执行绘制操作时只能识别指定的Texture格式,因此,在数据写入操作完成之后,通过数据封装在不改变数据的情况下,将数据的数据格式改变为Texture格式,解决了在数据写入操作分离之后,实现图片绘制操作的问题,实现了数据写入操作与图片绘制操作的成功分离,有效解决了图片绘制操作的卡顿问题。It can be seen that, in the embodiment of the present application, the working thread of the mobile terminal first writes the image data of the target image into the graphics buffer, and second, the worker thread encapsulates the image data written in the Graphic Buffer into the The texture map texture format recognized by the GL thread, and finally, the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture. It can be seen that since the data write operation does not need to call OpenGL ES to implement, the mobile terminal separates the time-consuming data write operation from the GL thread called by OpenGL ES, and is completed by other worker threads, improving the GL thread. The blocking problem is beneficial to improve the drawing speed of the GL thread and reduce the drawing time of the image, and the OpenGL ES calls the GL thread to only recognize the specified Texture format when performing the drawing operation on the image data, so the data writing operation is completed. After that, the data format is changed to the Texture format by data encapsulation without changing the data, which solves the problem of realizing the picture drawing operation after the data writing operation is separated, and realizes the data writing operation and the picture drawing operation. The successful separation effectively solves the problem of stuck in the picture drawing operation.
在一个可能的示例中,在控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式方面,所述封装单元602具体用于:控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据;以及用于控制所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有所述Texture格式的图像数据。In one possible example, the encapsulating unit 602 is specifically configured to: control the control unit, by controlling the working thread to encapsulate the image data written in the Graphic Buffer into a texture map texture format recognized by the GL thread. The worker thread encapsulates the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface; and is configured to control the worker thread to encapsulate the image data having the EGLImage format into the GL Thread-recognized image data having the Texture format.
在这个可能的示例中,如图6B所示,所述图片绘制装置600还包括发送单元604,其中,In this possible example, as shown in FIG. 6B, the picture drawing device 600 further includes a transmitting unit 604, where
所述发送单元604,用于所述执行单元控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作之前,控制所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程,所述地址标识用于所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据。The sending unit 604 is configured to: after the execution unit controls the GL thread to use the image data of the Texture format to perform a drawing operation for the target image, control the working thread to use the image data of the Texture format. The address identifier is sent to the GL thread, and the address identifier is used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
在一个可能的示例中,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述写入单元601具体用于:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程创建与所述图像数据的数据量匹配的所述Graphic Buffer;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。In one possible example, the writing unit 601 is specifically configured to: control the working thread to acquire a bitmap file as a bitmap file, by controlling the working thread to write the image data of the target image to the graphics buffer. The image data; and the Graphic Buffer for controlling the worker thread to match the data amount of the image data; and image data for controlling the worker thread to format the bitmap as a bitmap file Write to the Graphic Buffer.
在一个可能的示例中,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述写入单元601具体用于:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述GL线程创建的所述Graphic Buffer。In one possible example, the writing unit 601 is specifically configured to: control the working thread to acquire a bitmap file as a bitmap file, by controlling the working thread to write the image data of the target image to the graphics buffer. And the image data for controlling the worker thread to write the image data of the bitmap file Bitmap to the Graphic Buffer created by the GL thread.
在一个可能的示例中,在控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer方面,所述写入单元601具体用于:控制所述工作线程对所述Graphic Buffer启动读写锁;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer;以及用于控制所述工作线程关闭所述读写锁。In one possible example, the writing unit 601 is specifically configured to: control the working thread pair to control the working thread to write the image data of the bitmap file Bitmap to the Graphic Buffer. The Graphic Buffer starts a read/write lock; and is configured to control the worker thread to write the image data of the format bitmap file Bitmap to the Graphic Buffer; and to control the worker thread to close the read/write lock.
在一个可能的示例中,所述移动终端的前台运行有相册应用程序,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。In a possible example, the front end of the mobile terminal runs an album application, and the running interface of the photo album application includes a multi-image display interface, and the number of photos to be displayed in the multi-image display interface is greater than a preset number threshold. .
需要注意的是,本申请装置实施例所描述的图片绘制装置是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组件。It should be noted that the picture drawing device described in the device embodiment of the present application is presented in the form of a functional unit. The term "unit" as used herein shall be understood to mean the broadest possible meaning, and the object for implementing the functions described for each "unit" may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware. A processor (shared, dedicated or chipset) and memory of the program, combinatorial logic, and/or other suitable components that perform the functions described above.
具体来说,上述写入单元601、封装单元602和执行单元603可以是移动终端的处理器,发送单元604可能是内部通信接口。Specifically, the above writing unit 601, encapsulating unit 602, and executing unit 603 may be processors of the mobile terminal, and the transmitting unit 604 may be an internal communication interface.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program causing the computer to perform some or all of the steps of any of the methods described in the foregoing method embodiments. The above computer includes a mobile terminal.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。The embodiment of the present application further provides a computer program product, where the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause the computer to execute any one of the methods described in the foregoing method embodiments. Part or all of the steps of the method. The computer program product can be a software installation package, and the computer includes a mobile terminal.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present application is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present application. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种 逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit can be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present application. The foregoing memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable memory, and the memory can include: a flash drive Read-Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been described in detail above. The principles and implementations of the present application are described in the specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present application. A person of ordinary skill in the art, in view of the idea of the present application, is subject to change in the specific embodiments and the scope of application. In the above, the content of the present specification should not be construed as limiting the present application.

Claims (20)

  1. 一种图片绘制方法,其特征在于,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,所述方法包括:A picture drawing method is applied to a mobile terminal, wherein the mobile terminal runs a GL thread called by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, and the method includes:
    所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;The worker thread writes image data of the target picture to the graphics buffer Graphic Buffer;
    所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;The worker thread encapsulates the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
    所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The GL thread uses image data of the Texture format to perform a drawing operation for the target picture.
  2. 根据权利要求1所述的方法,其特征在于,所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式,包括:The method according to claim 1, wherein the worker thread encapsulates the image data written in the Graphic Buffer into a Texture Map Texture format recognized by the GL thread, comprising:
    所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据;The worker thread encapsulates the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface;
    所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有所述Texture格式的图像数据。The worker thread encapsulates the image data having the EGLImage format into image data having the Texture format recognized by the GL thread.
  3. 根据权利要求2所述的方法,其特征在于,所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作之前,所述方法还包括:The method according to claim 2, wherein before the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture, the method further comprises:
    所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程,所述地址标识用于所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据。The worker thread sends an address identifier of the image data of the Texture format to the GL thread, and the address identifier is used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer,包括:The method according to any one of claims 1-3, wherein the worker thread writes image data of the target picture to the graphics buffer, including:
    所述工作线程获取格式为位图文件Bitmap的所述图像数据;The worker thread acquires the image data in a format of a bitmap file Bitmap;
    所述工作线程创建与所述图像数据的数据量匹配的所述Graphic Buffer;The worker thread creates the Graphic Buffer that matches the amount of data of the image data;
    所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer,包括:The method according to any one of claims 1-3, wherein the worker thread writes image data of the target picture to the graphics buffer, including:
    所述工作线程获取格式为位图文件Bitmap的所述图像数据;The worker thread acquires the image data in a format of a bitmap file Bitmap;
    所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述GL线程创建的所述Graphic Buffer。The worker thread writes the image data in the format of the bitmap file Bitmap to the Graphic Buffer created by the GL thread.
  6. 根据权利要求4或5所述的方法,其特征在于,所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer,包括:The method according to claim 4 or 5, wherein the worker thread writes the image data in the format of the bitmap file Bitmap to the Graphic Buffer, including:
    所述工作线程对所述Graphic Buffer启动读写锁;The worker thread starts a read-write lock on the Graphic Buffer;
    所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer;The worker thread writes the image data in the format of a bitmap file Bitmap to the Graphic Buffer;
    所述工作线程关闭所述读写锁。The worker thread closes the read-write lock.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述移动终端的前台运行有相册应用程序,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。The method according to any one of claims 1-6, wherein the foreground of the mobile terminal runs an album application, and the running interface of the album application comprises a multi-picture display interface, and the multi-picture display interface The number of photos to be displayed is greater than the preset number threshold.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer之前,所述方法还包括:The method according to any one of claims 1 to 7, wherein the worker thread writes the image data of the target picture to the graphics buffer before the graphic buffer, the method further includes:
    检测到针对相册应用程序中所述目标图片的待显示操作;Detecting a to-be-displayed operation for the target picture in the album application;
    所述工作线程接收来自所述相册应用程序的所述目标图片的所述图像数据,所述图像数据的格式为所述位图文件Bitmap。The worker thread receives the image data from the target picture of the album application, the format of the image data being the bitmap file Bitmap.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作,包括:The method according to any one of claims 1-8, wherein the GL thread uses the image data of the Texture format to perform a drawing operation for the target picture, including:
    所述GL线程获取所述工作线程封装完成的所述Texture格式的图像数据;The GL thread acquires image data of the Texture format that is encapsulated by the worker thread;
    所述GL线程通过所述OpenGL ES中的第一函数对所述Texture格式的图像数据执行绘制操作。The GL thread performs a drawing operation on the image data of the Texture format through a first function in the OpenGL ES.
  10. 一种图片绘制装置,其特征在于,应用于移动终端,所述移动终端运行有图形拼接程序接口OpenGL ES调用的GL线程和除所述GL线程之外的工作线程,所述图片绘制装置包括写入单元、封装单元和执行单元,其中,A picture drawing device, which is applied to a mobile terminal, wherein the mobile terminal runs a GL thread called by a graphics splicing program interface OpenGL ES and a working thread other than the GL thread, and the picture drawing device includes writing Into the unit, the encapsulation unit and the execution unit, wherein
    所述写入单元,用于控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer;The writing unit is configured to control the working thread to write image data of the target picture to the graphics buffer Graphic Buffer;
    所述封装单元,用于控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式;The encapsulating unit is configured to control the working thread to encapsulate the image data written in the Graphic Buffer into a texture map Texture format recognized by the GL thread;
    所述执行单元,用于控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作。The execution unit is configured to control the GL thread to use image data of the Texture format to perform a drawing operation for the target image.
  11. 根据权利要求10所述的装置,其特征在于,在控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为所述GL线程识别的纹理贴图Texture格式方面,所述封装单元具体用于:控制所述工作线程将写入所述Graphic Buffer的所述图像数据封装为EGL接口识别的具有EGLImage格式的图像数据;以及用于控制所述工作线程将所述具有EGLImage格式的图像数据封装为所述GL线程识别的具有所述Texture格式的图像数据。The apparatus according to claim 10, wherein said encapsulating unit is specific in controlling said worker thread to encapsulate said image data written in said Graphic Buffer into a texture map Texture format recognized by said GL thread For controlling the worker thread to encapsulate the image data written in the Graphic Buffer into image data having an EGLImage format recognized by an EGL interface; and for controlling the worker thread to use the image data having the EGLImage format Encapsulating image data having the Texture format identified by the GL thread.
  12. 根据权利要求11所述的装置,其特征在于,所述图片绘制装置还包括发送单元,其中,The device according to claim 11, wherein the picture drawing device further comprises a transmitting unit, wherein
    所述发送单元,用于所述执行单元控制所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作之前,控制所述工作线程将所述Texture格式的图像数据的地址标识发送给所述GL线程,所述地址标识用于所述GL线程根据识别所述地址标识获取的地址使用所述Texture格式的图像数据。The sending unit, configured to: after the execution unit controls the GL thread to use the image data of the Texture format to perform a drawing operation for the target image, control the working thread to image data of the Texture format. An address identifier is sent to the GL thread, the address identifier being used by the GL thread to use image data of the Texture format according to an address obtained by identifying the address identifier.
  13. 根据权利要求10-12任一项所述的装置,其特征在于,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述写入单元具体用于:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程创建与所述图像数据的数据量匹配的所述Graphic Buffer;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer。The device according to any one of claims 10 to 12, wherein in the controlling the working thread to write the image data of the target picture to the graphic buffer, the writing unit is specifically used for: The worker thread acquires the image data in the format of a bitmap file Bitmap; and the graphic buffer for controlling the worker thread to match the data amount of the image data; and for controlling the worker thread to The image data in the format of the bitmap file Bitmap is written to the Graphic Buffer.
  14. 根据权利要求10-12任一项所述的装置,其特征在于,在控制所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer方面,所述写入单元具体用于:控制所述工作线程获取格式为位图文件Bitmap的所述图像数据;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述GL线程创建的所述Graphic Buffer。The device according to any one of claims 10 to 12, wherein in the controlling the working thread to write the image data of the target picture to the graphic buffer, the writing unit is specifically used for: The worker thread obtains the image data in the format of a bitmap file Bitmap; and controls the worker thread to write the image data in the format of the bitmap file Bitmap to the Graphic Buffer created by the GL thread.
  15. 根据权利要求13或14所述的装置,其特征在于,在控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer方面,所述写入单元具体用于:控制所述工作线程对所述Graphic Buffer启动读写锁;以及用于控制所述工作线程将所述格式为位图文件Bitmap的图像数据写入所述Graphic Buffer;以及用于控制所述工作线程关闭所述读写锁。The device according to claim 13 or 14, wherein the writing unit is specifically configured to: when the working thread is controlled to write the image data of the format bitmap file Bitmap to the Graphic Buffer: Controlling the worker thread to initiate a read/write lock on the Graphic Buffer; and controlling the worker thread to write the image data of the format bitmap file Bitmap to the Graphic Buffer; and for controlling the worker thread Turn off the read-write lock.
  16. 根据权利要求10-15任一项所述的装置,其特征在于,所述移动终端的前台运行有相册应用程序,所述相册应用程序的运行界面包括多图显示界面,所述多图显示界面中待显示照片的数量大于预设数量阈值。The device according to any one of claims 10-15, wherein the foreground of the mobile terminal runs an album application, and the running interface of the album application comprises a multi-image display interface, and the multi-image display interface The number of photos to be displayed is greater than the preset number threshold.
  17. 根据权利要求10-16任一项所述的装置,其特征在于,所述写入单元在所述工作线程将目标图片的图像数据写入图形缓存区Graphic Buffer之前,还用于:检测到针对相册应用程序中所述目标图片的待显示操作;控制所述工作线程接收来自所述相册应用程序的所 述目标图片的所述图像数据,所述图像数据的格式为所述位图文件Bitmap。The device according to any one of claims 10 to 16, wherein the writing unit is further configured to: detect that the image data of the target picture is written to the graphic buffer before the working thread a to-be-displayed operation of the target picture in the photo album application; controlling the worker thread to receive the image data of the target picture from the photo album application, the format of the image data being the bitmap file Bitmap.
  18. 根据权利要求10-17任一项所述的装置,其特征在于,在所述GL线程使用所述Texture格式的图像数据以执行针对所述目标图片的绘制操作方面,所述执行单元具体用于:控制所述GL线程获取所述工作线程封装完成的所述Texture格式的图像数据;以及用于控制所述GL线程通过所述OpenGL ES中的第一函数对所述Texture格式的图像数据执行绘制操作。The apparatus according to any one of claims 10-17, wherein the execution unit is specifically configured to use image data of the Texture format to perform a drawing operation for the target picture. Controlling, by the GL thread, image data of the Texture format encapsulated by the worker thread; and controlling the GL thread to perform rendering on the image data of the Texture format by using a first function in the OpenGL ES operating.
  19. 一种移动终端,其特征在于,包括处理器、存储器,所述存储器存储有程序,所述处理器用于调用所述程序以执行如权利要求1-9任一项所述的方法。A mobile terminal, comprising a processor, a memory, the memory storing a program, the processor for calling the program to perform the method according to any one of claims 1-9.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to perform the method of any one of claims 1-9 method.
PCT/CN2019/077196 2018-03-09 2019-03-06 Image rendering method and related product WO2019170110A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810195162.3A CN108509240B (en) 2018-03-09 2018-03-09 Picture drawing method and related product
CN201810195162.3 2018-03-09

Publications (1)

Publication Number Publication Date
WO2019170110A1 true WO2019170110A1 (en) 2019-09-12

Family

ID=63376318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077196 WO2019170110A1 (en) 2018-03-09 2019-03-06 Image rendering method and related product

Country Status (2)

Country Link
CN (1) CN108509240B (en)
WO (1) WO2019170110A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509240B (en) * 2018-03-09 2020-08-11 Oppo广东移动通信有限公司 Picture drawing method and related product
CN110737433B (en) * 2019-10-16 2023-04-25 李富科 Graphic display method and device for C language program
CN112530549B (en) * 2020-12-03 2023-09-29 武汉联影医疗科技有限公司 Image display method, device and computer equipment
WO2023245494A1 (en) * 2022-06-22 2023-12-28 云智联网络科技(北京)有限公司 Method and apparatus for acquiring texture data from rendering engine, and electronic device
CN115167949B (en) * 2022-09-08 2022-12-06 西安芯瞳半导体技术有限公司 Method, device and medium for adapting high-version OpenGL function to low-version application program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191860A1 (en) * 2002-04-05 2003-10-09 Gadepalli Krishna K. Accelerated collaboration of high frame rate applications
CN101021952A (en) * 2007-03-23 2007-08-22 北京中星微电子有限公司 Method and apparatus for realizing three-dimensional video special efficiency
CN104142807A (en) * 2014-08-02 2014-11-12 合一网络技术(北京)有限公司 Android-control-based method and system for drawing image through OpenGL
CN108509240A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9324175B2 (en) * 2009-09-11 2016-04-26 Nvidia Corporation Memory coherency in graphics command streams and shaders
US9582849B2 (en) * 2013-10-28 2017-02-28 Vmware, Inc. Method and system to virtualize graphic processing services
CN106340055A (en) * 2016-08-19 2017-01-18 江苏电力信息技术有限公司 Multithreading-based OpenGL quick drawing method
WO2018119602A1 (en) * 2016-12-26 2018-07-05 深圳前海达闼云端智能科技有限公司 Rendering method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030191860A1 (en) * 2002-04-05 2003-10-09 Gadepalli Krishna K. Accelerated collaboration of high frame rate applications
CN101021952A (en) * 2007-03-23 2007-08-22 北京中星微电子有限公司 Method and apparatus for realizing three-dimensional video special efficiency
CN104142807A (en) * 2014-08-02 2014-11-12 合一网络技术(北京)有限公司 Android-control-based method and system for drawing image through OpenGL
CN108509240A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product

Also Published As

Publication number Publication date
CN108509240A (en) 2018-09-07
CN108509240B (en) 2020-08-11

Similar Documents

Publication Publication Date Title
WO2019170110A1 (en) Image rendering method and related product
WO2019170126A1 (en) Picture drawing method and related products
US10921967B2 (en) Electronic device and method for configuring display thereof
CN108702480B (en) Electronic device and method for driving display thereof
CN104869305B (en) Method and apparatus for processing image data
EP3160150A1 (en) Electronic device and method for executing function using speech recognition thereof
CN107925749B (en) Method and apparatus for adjusting resolution of electronic device
US20220058772A1 (en) Image Processing Method and Device
US10347166B2 (en) Electronic device and operating method thereof
CN107635078B (en) Game control method and device
CN106648496B (en) Electronic device and method for controlling display of electronic device
US10609276B2 (en) Electronic device and method for controlling operation of camera-related application based on memory status of the electronic device thereof
CN107797868B (en) Resource adjusting method and device
US10999501B2 (en) Electronic device and method for controlling display of panorama image
CN116055773A (en) Multi-screen collaboration method, system and electronic equipment
WO2017202175A1 (en) Method and device for video compression and electronic device
CN110991368A (en) Camera scene recognition method and related device
KR20150051078A (en) Lock screen display method of electronic apparatus and electronic appparatus thereof
WO2019076213A1 (en) Network control method and device
KR20150027934A (en) Apparatas and method for generating a file of receiving a shoot image of multi angle in an electronic device
CN110178111B (en) Image processing method and device for terminal
US10212215B2 (en) Apparatus and method for providing metadata with network traffic
WO2019076254A1 (en) Game application control method, and device
KR102213429B1 (en) Apparatus And Method For Providing Sound
US20160259533A1 (en) Retaining user selected screen area on user equipment

Legal Events

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

Ref document number: 19763777

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19763777

Country of ref document: EP

Kind code of ref document: A1