WO2023087778A1 - 窗口信息处理方法、装置、电子设备及存储介质 - Google Patents

窗口信息处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023087778A1
WO2023087778A1 PCT/CN2022/108722 CN2022108722W WO2023087778A1 WO 2023087778 A1 WO2023087778 A1 WO 2023087778A1 CN 2022108722 W CN2022108722 W CN 2022108722W WO 2023087778 A1 WO2023087778 A1 WO 2023087778A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
window
application interface
buffer
drawing application
Prior art date
Application number
PCT/CN2022/108722
Other languages
English (en)
French (fr)
Inventor
沙斌
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023087778A1 publication Critical patent/WO2023087778A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Definitions

  • the present disclosure relates to computer technology, and in particular to a window information processing method, device, electronic equipment, storage medium, computer program product and computer program.
  • OpenGL Open Graphics Library, Open Graphics Library
  • API application programming interface
  • Vulkan is a cross-platform 2D and 3D drawing application program interface (Application Programming Interface, API), Vulkan API is called "the next generation of OpenGL action”.
  • OpenGL rendering instructions can implement hardware graphics acceleration through the Vulkan driver.
  • Vulkan the creation of graphics windows requires Vulkan to communicate with the underlying window system of the Linux system. Therefore, how to improve the efficiency of window creation and rendering is one of the key points that need to be improved.
  • Embodiments of the present disclosure provide an information processing method, device, electronic equipment, storage medium, computer program product, and computer program to solve problems in related technologies.
  • the technical solutions are as follows:
  • an embodiment of the present disclosure provides a method for processing window information, including:
  • the image frame texture information generated according to the information to be displayed is filled in the target buffer of the Android drawing application interface driver; the image frame texture information is used to generate a display screen in a native window that communicates based on the communication protocol of the Linux system;
  • the submission information corresponding to the target buffer is submitted to the canvas window of the Android drawing application interface driver, and the submission information is generated according to the filling operation of the image frame texture information;
  • the image frame texture information generated according to the information to be displayed is filled in the target buffer of the Android drawing application interface driver, including:
  • obtaining the target buffer in the buffer queue corresponding to the Android drawing application interface driver includes:
  • the submission information corresponding to the target buffer is submitted to the canvas window of the Android drawing application interface driver, including:
  • the window information processing method further includes:
  • an instance of the Android drawing application interface is generated
  • the window information processing method further includes:
  • the canvas window is used to forward the submission information to the native window, including:
  • the acquisition address function pointer of the canvas window Utilize the acquisition address function pointer of the canvas window to determine the address of the Linux system instance; the acquisition address function pointer is obtained after the expansion of the communication protocol based on the Linux system to the instance process address acquisition function pointer of the canvas window;
  • the submission information is forwarded to the native window.
  • an embodiment of the present disclosure provides a window information processing device, including:
  • the information to be displayed acquisition module the application obtains the information to be displayed of the Linux application;
  • the filling module is used to fill the image frame texture information generated according to the information to be displayed in the target buffer of the Android drawing application interface driver; the image frame texture information is used to generate a display screen in a native window that communicates based on the communication protocol of the Linux system ;
  • a submission module is used to submit the submission information corresponding to the target buffer to the canvas window of the Android drawing application interface driver, and the submission information is generated according to the filling operation of the texture information of the image frame;
  • the forwarding module is used to use the canvas window to forward the submitted information to the native window, so that the native window can obtain the texture information of the image frame according to the submitted information.
  • the filling module includes:
  • the target buffer acquisition unit is used to obtain the target buffer in the buffer queue corresponding to the Android drawing application interface driver according to the information to be displayed, and the target buffer is in an unoccupied state;
  • the target buffer processing unit is configured to fill the target buffer with image frame texture information corresponding to the information to be displayed.
  • the target buffer acquisition unit is also used for:
  • the submission module includes:
  • the first submission unit is configured to submit the target index as submission information to the canvas window of the Android drawing application interface driver.
  • the window information processing device further includes:
  • the first instance generation module is used to generate an Android drawing application interface instance according to the running information of the Linux application;
  • the canvas window creation module is used to create the canvas window of the Android drawing application interface through the Android drawing application interface instance.
  • the window information processing device further includes:
  • the second example generation module is used to create a Linux system instance based on the Android drawing application interface instance
  • the running module is used to run the native window in the Linux system instance.
  • the forwarding module includes:
  • the address determination unit is used to determine the address of the Linux system instance by utilizing the acquisition address function pointer of the canvas window; the acquisition address function pointer is obtained after the expansion of the communication protocol based on the Linux system to the instance process address acquisition function pointer of the canvas window;
  • the submission information forwarding unit is configured to forward the submission information to the native window according to the address.
  • an embodiment of the present disclosure provides an electronic device for processing window information, and the electronic device includes: a memory and a processor.
  • the memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processing The device executes the method in any one of the implementation manners of the foregoing aspects.
  • an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program.
  • the computer program When the computer program is run on a computer, the method in any one of the above-mentioned aspects is executed.
  • an embodiment of the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, implements the method in any one of the above-mentioned aspects.
  • the embodiments of the present disclosure provide a computer program, and when the computer program is executed by a processor, the method in any one of the implementation manners of the foregoing aspects is implemented.
  • the advantages or beneficial effects of the above technical solutions at least include: through the Android Vulkan driver and the Wayland protocol based on the Linux system, the information to be displayed can be stored through the buffer queue, and the establishment of the Vulkan graphics window and the synchronization with the rendering and display of the window system can be realized. Thereby improving the speed and efficiency of window creation and rendering.
  • FIG. 1 is a schematic diagram of a window information processing method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a window information processing method according to another embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a method for processing window information in an example of the present disclosure
  • FIG. 4 is a schematic diagram of a window information processing device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a window information processing device according to another embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a window information processing device according to another embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a window information processing device according to another embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a window information processing device according to another embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a window information processing device according to another embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of an electronic device for window information processing according to an embodiment of the present disclosure.
  • Fig. 1 shows a flowchart of a window information processing method according to an embodiment of the present disclosure.
  • the window information processing method may include:
  • Step S11 obtaining the information to be displayed of the Linux application
  • Step S12 filling the image frame texture information generated according to the information to be displayed in the target buffer of the Android drawing application interface driver; the image frame texture information is used to generate a display screen in a native window that communicates based on the communication protocol of the Linux system;
  • Step S13 Submit the submission information corresponding to the target buffer to the canvas window of the Android drawing application interface (Vulkan) driver, and the submission information is generated according to the filling operation of the texture information of the image frame;
  • Step S14 Use the canvas window to forward the submitted information to the native window, so that the native window can obtain the texture information of the image frame according to the submitted information.
  • the information to be displayed of the Linux application may be the application interface data generated by the Linux application for display, the display mode of the application interface, and the like.
  • the information to be displayed of the application may be acquired through monitoring or active acquisition. After obtaining the information to be displayed each time, based on the information to be displayed, apply for a buffer of the Android system based on Linux, and render the information to be displayed, so as to generate image frame texture information for display on the display interface.
  • the target buffer may be acquired from the buffer queue corresponding to the Vulkan interface of the Android system in the order of buffers in an unoccupied state. Submit the submission information corresponding to the target buffer to the canvas window of the Android drawing application interface driver.
  • the handle corresponding to the target buffer may be submitted to the canvas window as the submission information, so that the relevant components of the canvas window can use the handle to control the target buffer. district.
  • the communication protocol based on the Linux system may be the Wayland protocol.
  • Wayland can be regarded as a simple "display server", which defines how to communicate with the kernel and how to communicate with the Client.
  • Commit information may be generated upon completion of a fill operation of image frame texture information. That is, it is generated after the completion of the filling operation of the texture information of the image frame.
  • Vulkan in this embodiment is created based on the Android system.
  • Android Vulkan can include two parts: Runtime (runtime module) and Driver (driver).
  • Vulkan Runtime builds BufferQueue (buffer queue), and communicates with the Android system through the buffer queue mechanism.
  • the driver part can be used to apply for, fill and submit the target buffer, and the driver part can also be used to create and maintain the canvas.
  • the information to be displayed can be stored in the buffer queue to realize the establishment of the Vulkan graphics window and the synchronization with the rendering and display of the window system, thereby improving the establishment and rendering of the window. speed and efficiency.
  • the image frame texture information generated according to the information to be displayed is filled in the target buffer of the Android drawing application interface driver, as shown in Figure 2, including:
  • Step S21 Obtain the target buffer in the buffer queue corresponding to the Android drawing application interface driver according to the information to be displayed, and the target buffer is in an unoccupied state;
  • Step S22 filling the target buffer with the image frame texture information corresponding to the information to be displayed.
  • a buffer in an unoccupied state may be represented by a certain mark. For example, whenever the window fetches the texture information of the image frame in the buffer and generates the display screen, the buffer is cleared. A flag can be used to indicate that a buffer is occupied or unoccupied.
  • the buffer Only when the window takes out the image frame texture information of the buffer, generates a display screen, and modifies the state of the buffer to unoccupied, can the buffer be used to fill new image frame texture information.
  • the unused target buffer can be used to generate the display screen.
  • obtaining the target buffer in the buffer queue corresponding to the Android drawing application interface driver includes:
  • the swap chain array of the Android drawing application interface driver includes a series of indexes, and each index corresponds to a buffer. Each time the buffer is acquired, it can be acquired sequentially according to the order of the indexes in the swap chain array.
  • indexes corresponding to the same buffer may be the same or different.
  • the submission information corresponding to the target buffer is submitted to the canvas window of the Android drawing application interface driver, including:
  • the commit information can be used to obtain the handle of the target buffer.
  • the canvas window can obtain a handle, control the target buffer, and obtain the image frame texture information in the target buffer.
  • the window information processing method further includes:
  • an instance of the Android drawing application interface is generated
  • an Android drawing application interface instance may be generated during the initialization phase of the Linux application.
  • the window information processing method further includes:
  • the Linux system instance can be created on the basis of the Android system instance. For example, on the basis of the Android system instance, create a Linux system instance based on the Wayland protocol for communication information transmission. Through the Linux system instance, run the process of the native window.
  • the canvas window is used to forward the submission information to the native window, including:
  • the acquisition address function pointer of the canvas window Utilize the acquisition address function pointer of the canvas window to determine the address of the Linux system instance; the acquisition address function pointer is obtained after the expansion of the communication protocol based on the Linux system to the instance process address acquisition function pointer of the canvas window;
  • the submission information is forwarded to the native window.
  • the submission information may be the buffer itself, information about the buffer handle, an index corresponding to the buffer handle, and the like.
  • the native window can obtain the image frame texture information in the target buffer.
  • VkInstance Vulkan instance
  • the App will first create an Instance (instance) through the vkCreateInstance() interface function, then query the physical devices in the system through the vkEnumeratePhysicalDevices() interface function, and then use the vkCreateDevice() interface function to create a logical device based on the specified physical device.
  • the vkEnumeratePhysicalDevices() interface function is used to enumerate physical devices.
  • the Vulkan interface does not need to expose the interface statically when used, and the pointer of the interface function can be obtained through the vkGetInstanceProcAddr() interface function.
  • the vkGetInstanceProcAddr() interface function can be used to obtain the instance process address. Therefore, in this example, a Linux system instance for information transmission based on the Wayland communication protocol under Linux is constructed on the basis of an Android instance, and the function pointer contained in the vkGetInstanceProcAddr interface function is extended based on the Wayland communication protocol of the Linux system, so that it can Transfer information such as buffers and related handles between Linux system applications and windows of the Linux system.
  • the extended interface vkCreateWaylandSurfaceKHR is obtained by extending the instance interface vkCreateSurface, and the Vulkan graphics buffer VkSurfaceKHR31 is obtained through the extended interface vkCreateWaylandSurfaceKHR, which consists of two parts.
  • the first part of the graphics buffer VkSurfaceKHR31 is constructed and initialized by WaylandNativeWindow derived from BufferQueue (Linux native window for communication based on the Wayland protocol).
  • the initialization process mainly includes creating the Wayland window system proxy side objects Wayland_window32 (Wayland window or the Wayland native window in the preceding embodiment) and Window_surface33 (canvas window).
  • the canvas window can share the canvas part of the Vulkan driver (Driver::Surface), through Window_surface33, establishes the connection between the Vulkan graphics buffer and the underlying window system of the Linux system.
  • Window_surface33 can obtain the index corresponding to the buffer through the address acquisition function of Vulkan, and further obtain the handle that can control the buffer (recorded as swapchain_handle37 ). Simultaneously, apply for a buffer queue 34 with a length of 3 (or other quantities) Buffers for the canvas window through the display storage driver Gralloc (Graphics Alloc, graphics allocation) module.
  • Gralloc Graphics Alloc, graphics allocation
  • VkSurfaceKHR31 creates a Vulkan swap chain recorded as VkSwapchainKHR35d via the vkCreateSwapchainKHR() interface function).
  • VkSwapchainKHR35 will obtain WaylandNativeWindow (Wayland native window) through the BufferQueue mechanism interface to build a buffer queue 34 with a buffer number of 3, and convert the image frame texture in the graphics buffer in the acquired buffer queue 34 into a vkImage (Vulkan screen ), these vkImages are maintained by the driver::Swapchain::Image array of the driver layer, that is, the num_image36 array shown in Figure 3.
  • the maximum number of elements in the array can be the same as the number of buffer queues built in WaylandNativeWindow.
  • the num_image 36 array contains multiple indexes, each index corresponds to a native window buffer (A Native Window Buffer), and the buffer further corresponds to the image frame texture used to generate the picture (Image).
  • vkAcquireNextImageKHR () interface function of the swapchain (swapping chain) part to obtain a buffer available to the App, that is, the target buffer in the foregoing embodiment.
  • the buffer is represented by the index of the driver::Swapchain::Image array in the Swapchain.
  • the driver::Swapchain::Image array it contains multiple indexes, and each index corresponds to a buffer.
  • the buffer is represented by an index.
  • WaylandNativeWindow will submit the buffer for display through the Wayland window system proxy objects Wayland_window and Window_surface, that is, submit the rendered buffer to the underlying Linux window management system to complete the final composite display.
  • the mechanism of establishing a graphics window buffer in combination with the Wayland protocol and the Android Vulkan driver under the Linux system is realized.
  • this example realizes that the Vulkan rendered information to be displayed by the Linux application is synchronized with the rendered display of the Linux window system.
  • the window information processing method of the embodiment of the present disclosure can improve the efficiency of window information processing.
  • the buffer queue and canvas window of the above embodiments of the present disclosure the synchronization of window information rendering and window information display of Linux applications can be realized, improving Window information processing efficiency.
  • Fig. 4 shows a structural block diagram of an apparatus for processing window information according to an embodiment of the present disclosure.
  • the device may include:
  • the information to be displayed acquisition module 41 the application acquires the information to be displayed of the Linux application;
  • the filling module 42 is used to fill the image frame texture information generated according to the information to be displayed in the target buffer of the Android drawing application interface driver; the image frame texture information is used to generate and display in the native window based on the communication protocol of the Linux system picture;
  • submission module 43 is used to submit the submission information corresponding to the target buffer to the canvas window of the Android drawing application interface driver, and the submission information is generated according to the filling operation of the image frame texture information;
  • the forwarding module 44 is configured to use the canvas window to forward the submitted information to the native window, so that the native window can obtain the texture information of the image frame according to the submitted information.
  • the filling module includes:
  • the target buffer acquisition unit 51 is used to obtain the target buffer in the buffer queue corresponding to the Android drawing application interface driver according to the information to be displayed, and the target buffer is in an unoccupied state;
  • the target buffer processing unit 52 is configured to fill the target buffer with image frame texture information corresponding to the information to be displayed.
  • the target buffer acquisition unit is also used for:
  • the submission module includes:
  • the first submission unit 61 is configured to submit the target index as submission information to the canvas window of the Android drawing application interface driver.
  • the window information processing device further includes:
  • the first instance generating module 71 is used to generate an Android drawing application interface instance according to the running information of the Linux application;
  • the canvas window creating module 72 is configured to create a canvas window of the Android drawing application interface through an instance of the Android drawing application interface.
  • the window information processing device further includes:
  • the second example generation module 81 is used to create a Linux system instance based on the Android drawing application interface instance;
  • the running module 82 is used for running the native window in the Linux system instance.
  • the forwarding module includes:
  • Address determination unit 91 is used to determine the address of the Linux system instance by using the acquisition address function pointer of the canvas window; the acquisition address function pointer is obtained after the extension of the communication protocol based on the Linux system to the instance process address acquisition function pointer of the canvas window ;
  • the submission information forwarding unit 92 is configured to forward the submission information to the native window according to the address.
  • Fig. 10 shows a structural block diagram of an electronic device for processing window information according to an embodiment of the present disclosure.
  • the window information processing electronic device includes: a memory 910 and a processor 920 , and the memory 910 stores computer programs that can run on the processor 920 .
  • the processor 920 executes the computer program, the method for processing window information in the foregoing embodiments is realized.
  • the number of memory 910 and processor 920 may be one or more.
  • the window information processing electronics also includes:
  • the communication interface 930 is used for communicating with external devices for interactive data transmission.
  • the bus can be an Industry Standard Architecture (Industry Standard Architecture, ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus, etc.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 10 , but it does not mean that there is only one bus or one type of bus.
  • the memory 910, the processor 920, and the communication interface 930 may communicate with each other through an internal interface.
  • the embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the method provided in the embodiment of the present disclosure is implemented.
  • An embodiment of the present disclosure also provides a chip, the chip includes a processor, configured to call from a memory and execute instructions stored in the memory, so that a communication device installed with the chip executes the method provided by the embodiment of the present disclosure.
  • An embodiment of the present disclosure also provides a chip, including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory , when the code is executed, the processor is configured to execute the method provided by the embodiment of the present disclosure.
  • the embodiment of the present disclosure also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method provided in the embodiment of the present disclosure is implemented.
  • the embodiment of the present disclosure also provides a computer program, which implements the method provided in the embodiment of the present disclosure when the computer program is executed by a processor.
  • processor can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processing (digital signal processing, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. It should be noted that the processor may be a processor supporting advanced RISC machines (ARM) architecture.
  • ARM advanced RISC machines
  • the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory.
  • the memory can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
  • the non-volatile memory can include read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM random access memory
  • static random access memory static random access memory
  • dynamic random access memory dynamic random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory synchronous DRAM, SDRAM
  • double data rate synchronous dynamic random access Memory double data date SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous connection dynamic random access memory direct rambus RAM
  • direct rambus direct rambus RAM
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • a computer program product includes one or more computer instructions. When computer program instructions are loaded and executed on a computer, the processes or functions according to the present disclosure are produced in whole or in part.
  • a computer can be a general purpose computer, special purpose computer, a computer network, or other programmable apparatus. Computer instructions may be stored in, or transmitted from, one computer-readable storage medium to another computer-readable storage medium.
  • first and second are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
  • the features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
  • “plurality” means two or more, unless otherwise specifically defined.
  • various parts of the present disclosure may be implemented in hardware, software, firmware or a combination thereof.
  • various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by instructing related hardware through a program.
  • the program can be stored in a computer-readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or its combination.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the above-mentioned integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Generation (AREA)

Abstract

本公开提出一种窗口信息处理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序。所述方法包括:获取Linux应用的待显示信息;将根据所述待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;所述图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;将所述目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口;利用所述画布窗口,将所述提交信息转发至所述原生窗口,使得所述原生窗口能够根据提交信息获取所述图像帧纹理信息。本公开实施例能够提高窗口画面渲染、生成效率。

Description

窗口信息处理方法、装置、电子设备及存储介质
相关申请的交叉引用
本公开要求于2021年11月19日提交的申请号为202111372860.4、名称为“窗口信息处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,此申请的内容通过引用并入本文。
技术领域
本公开涉及计算机技术,尤其涉及一种窗口信息处理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序。
背景技术
Linux,全称GNU/Linux,是一种目标广泛使用和自由传播的类UNIX操作系统。OpenGL(Open Graphics Library,开放图形库)是用于渲染2D、3D矢量图形的跨语言、跨平台的应用程序编程接口(API),可存在于诸如Linux之类的UNIX平台。Vulkan是一个跨平台的2D和3D绘图应用程序接口(Application Programming Interface,API),Vulkan API被称为“下一代OpenGL行动”。
在Linux系统中,OpenGL渲染指令可以通过Vulkan驱动实现硬件图形加速。但是图形窗口的创建需要Vulkan与Linux系统底层窗口系统通信实现。从而如何提高窗口创建和渲染的效率,是需要改进的重点之一。
发明内容
本公开实施例提供一种口信息处理方法、装置、电子设备、存储介质、计算机程序产品及计算机程序,以解决相关技术存在的问题,技术方案如下:
第一方面,本公开实施例提供了一种窗口信息处理方法,包括:
获取Linux应用的待显示信息;
将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,所述提交信息根据所述图像帧纹理信息的填充操作生成;
利用画布窗口,将提交信息转发至原生窗口,使得原生窗口能够根据提交信息获取图像 帧纹理信息。
在一种实施方式中,将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区,包括:
根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,目标缓冲区处于未占用状态;
将待显示的信息对应的图像帧纹理信息填充在目标缓冲区。
在一种实施方式中,根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,包括:
根据待显示的信息,获取安卓绘图应用接口驱动器的交换链数组中的目标索引;
确定目标索引在缓冲区队列中对应的缓冲区为目标缓冲区。
在一种实施方式中,将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,包括:
将目标索引作为提交信息,提交至安卓绘图应用接口驱动器的画布窗口。
在一种实施方式中,窗口信息处理方法还包括:
根据Linux应用的运行信息,生成安卓绘图应用接口实例;
通过安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
在一种实施方式中,窗口信息处理方法还包括:
基于安卓绘图应用接口实例,创建Linux系统实例;
在Linux系统实例中运行原生窗口。
在一种实施方式中,利用画布窗口,将提交信息转发至原生窗口,包括:
利用画布窗口的获取地址函数指针,确定Linux系统实例的地址;获取地址函数指针为对画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
根据地址,将提交信息转发至原生窗口。
第二方面,本公开实施例提供了一种窗口信息处理装置,包括:
待显示信息获取模块,应用获取Linux应用的待显示信息;
填充模块,用于将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
提交模块,用于将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,所述提交信息根据所述图像帧纹理信息的填充操作生成;
转发模块,用于利用画布窗口,将提交信息转发至原生窗口,使得原生窗口能够根据提 交信息获取图像帧纹理信息。
在一种实施方式中,填充模块包括:
目标缓冲区获取单元,用于根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,目标缓冲区处于未占用状态;
目标缓冲区处理单元,用于将待显示的信息对应的图像帧纹理信息填充在目标缓冲区。
在一种实施方式中,目标缓冲区获取单元还用于:
根据待显示的信息,获取安卓绘图应用接口驱动器的交换链数组中的目标索引;
确定目标索引在缓冲区队列中对应的缓冲区为目标缓冲区。
在一种实施方式中,提交模块包括:
第一提交单元,用于将目标索引作为提交信息,提交至安卓绘图应用接口驱动器的画布窗口。
在一种实施方式中,窗口信息处理装置还包括:
第一实例生成模块,用于根据Linux应用的运行信息,生成安卓绘图应用接口实例;
画布窗口创建模块,用于通过安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
在一种实施方式中,窗口信息处理装置还包括:
第二示例生成模块,用于基于安卓绘图应用接口实例,创建Linux系统实例;
运行模块,用于在Linux系统实例中运行原生窗口。
在一种实施方式中,转发模块包括:
地址确定单元,用于利用画布窗口的获取地址函数指针,确定Linux系统实例的地址;获取地址函数指针为对画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
提交信息转发单元,用于根据地址,将提交信息转发至原生窗口。
第三方面,本公开实施例提供了一种窗口信息处理电子设备,该电子设备包括:存储器和处理器。其中,该该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且当该处理器执行该存储器存储的指令时,使得该处理器执行上述各方面任一种实施方式中的方法。
第四方面,本公开实施例提供了一种计算机可读存储介质,计算机可读存储介质存储计算机程序,当计算机程序在计算机上运行时,上述各方面任一种实施方式中的方法被执行。
第五方面,本公开实施例提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方面任一种实施方式中的方法。
第六方面,本公开实施例提供了一种计算机程序,该计算机程序被处理器执行时实现上述各方面任一种实施方式中的方法。
上述技术方案中的优点或有益效果至少包括:通过Android Vulkan驱动和基于Linux系统的Wayland协议,可通过缓冲区队列存放需要显示的信息,实现Vulkan图形窗口的建立以及与窗口系统的渲染显示同步,从而提高窗口的建立以及渲染的速度和效率。
上述概述仅仅是为了说明书的目的,并不意图以任何方式进行限制。除上述描述的示意性的方面、实施方式和特征之外,通过参考附图和以下的详细描述,本公开进一步的方面、实施方式和特征将会是容易明白的。
附图说明
在附图中,除非另外规定,否则贯穿多个附图相同的附图标记表示相同或相似的部件或元素。这些附图不一定是按照比例绘制的。应该理解,这些附图仅描绘了根据本公开公开的一些实施方式,而不应将其视为是对本公开范围的限制。
图1为本公开一实施例窗口信息处理方法示意图;
图2为本公开另一实施例窗口信息处理方法示意图;
图3为本公开一示例的窗口信息处理方法示意图;
图4为本公开一实施例窗口信息处理装置示意图;
图5为本公开另一实施例窗口信息处理装置示意图;
图6为本公开又一实施例窗口信息处理装置示意图;
图7为本公开又一实施例窗口信息处理装置示意图;
图8为本公开又一实施例窗口信息处理装置示意图;
图9为本公开又一实施例窗口信息处理装置示意图;
图10为本公开一实施例窗口信息处理电子设备示意图。
具体实施方式
在下文中,仅简单地描述了某些示例性实施例。正如本领域技术人员可认识到的那样,在不脱离本公开的精神或范围的情况下,可通过各种不同方式修改所描述的实施例。因此,附图和描述被认为本质上是示例性的而非限制性的。
图1示出根据本公开一实施例的窗口信息处理方法的流程图。如图1所示,该窗口信息处理方法可以包括:
步骤S11:获取Linux应用的待显示信息;
步骤S12:将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
步骤S13:将目标缓冲区对应的提交信息提交至安卓绘图应用接口(Vulkan)驱动器的画布窗口,所述提交信息根据所述图像帧纹理信息的填充操作生成;
步骤S14:利用画布窗口,将提交信息转发至原生窗口,使得原生窗口能够根据提交信息获取图像帧纹理信息。
本实施例中,Linux应用的待显示信息,可以是Linux应用生成的用于显示的应用界面数据、应用界面的显示方式等。
在具体实现方式中,可以通过监听或者主动获取的方式,获取应用的待显示信息。在每次获取待显示信息之后,可以基于待显示的信息,申请基于Linux的安卓系统的缓冲区,并将待显示的信息进行渲染,生成用于在显示界面显示的图像帧纹理信息。
目标缓冲区可以是从安卓系统的Vulkan接口对应的缓冲区队列中,按照处于未占用状态的缓冲区的顺序获取的。将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,可以是将目标缓冲区对应的句柄作为提交信息,提交至画布窗口,使得画布窗口的相关组件能够利用句柄对应控制目标缓冲区。
基于Linux系统的通信协议,可以是Wayland协议。Wayland可以看作是一个简单的“显示服务器”,定义了如何与内核通讯、如何与Client通讯。
提交信息可以根据图像帧纹理信息的填充操作的完成而生成。即,在图像帧纹理信息的填充操作的完成后生成。
本实施例中的Vulkan基于安卓系统创建。Android Vulkan可以包括Runtime(运行时态模块)和Driver(驱动器)两部分。在安卓系统中,Vulkan Runtime构建BufferQueue(缓冲队列),通过缓冲队列机制实现与Android系统的通信。本实施例中,可以通过驱动器部分申请、填充和提交目标缓冲区,同样通过驱动器部分创建和维护画布。
通过在Linux系统下实现安卓Vulkan构建BufferQueue,并对Wayland协议进行功能扩展,使其能够与安卓Vulkan的驱动器部分进行缓冲区信息的传递和目标缓冲区的使用,实现Vulkan图形窗口的建立以及与窗口系统的渲染显示同步。
本实施例中,通过Android Vulkan驱动和基于Linux系统的Wayland协议,可通过缓冲区队列存放需要显示的信息,实现Vulkan图形窗口的建立以及与窗口系统的渲染显示同步,从而提高窗口的建立以及渲染的速度和效率。
在一种实施方式中,将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口 驱动器的目标缓冲区,如图2所示,包括:
步骤S21:根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,目标缓冲区处于未占用状态;
步骤S22:将待显示的信息对应的图像帧纹理信息填充在目标缓冲区。
本实施例中,处于未占用状态的缓冲区,可以用一定的标记进行表示。比如,每当窗口将缓冲区的图像帧纹理信息取出,生成显示画面后,缓冲区被清空。可采用标记表示缓冲区处于占用或未占用状态。
在窗口将缓冲区的图像帧纹理信息取出、生成显示画面,并将缓冲区的状态修改为未占用的情况下,才能够将缓冲区用于填充新的图像帧纹理信息。
本实施例中,通过获取目标缓冲区、将图像帧纹理信息填充于目标缓冲区中,从而能够利用处于未使用状态的目标缓冲区进行显示画面的生成。
在一种实施方式中,根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,包括:
根据待显示的信息,获取安卓绘图应用接口驱动器的交换链数组(Swapchain)中的目标索引(Index);
确定目标索引在缓冲区队列中对应的缓冲区为目标缓冲区。
本实施例中,安卓绘图应用接口驱动器的交换链数组中,包括一系列索引,每个索引对应一个缓冲区。每次获取缓冲区时,可按照交换链数组中的索引的顺序,进行顺序获取。
在具体实现方式中,同一缓冲区所对应的索引可以相同或不同。
在一种实施方式中,将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,包括:
将目标索引作为提交信息,提交至安卓绘图应用接口驱动器的画布窗口。
本实施例中,提交信息可以用于获取目标缓冲区的句柄。画布窗口可以根据提交信息,获取句柄,控制目标缓冲区,并获取目标缓冲区中的图像帧纹理信息。
在一种实施方式中,窗口信息处理方法还包括:
根据Linux应用的运行信息,生成安卓绘图应用接口实例;
通过安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
本实施例中,可在Linux应用初始化阶段,生成安卓绘图应用接口实例。
在一种实施方式中,窗口信息处理方法还包括:
基于安卓绘图应用接口实例,创建Linux系统实例;
在Linux系统实例中运行原生窗口。
本实施例中,Linux系统实例可在安卓系统实例的基础上进行创建。比如,在安卓系统实例的基础上,创建基于Wayland协议进行通信信息传输的Linux系统实例。通过Linux系统实例,运行原生窗口的进程。
在一种实施方式中,利用画布窗口,将提交信息转发至原生窗口,包括:
利用画布窗口的获取地址函数指针,确定Linux系统实例的地址;获取地址函数指针为对画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
根据地址,将提交信息转发至原生窗口。
在具体实施例中,提交信息可以是缓冲区本身、缓冲区句柄的信息、缓冲区句柄对应的索引等。通过提交信息,原生窗口可获得目标缓冲区内的图像帧纹理信息。
在本公开一种示例中,基于安卓的Vulkan的所有App(Application,应用)的相关的状态均存在VkInstance(Vulkan实例)中。在应用的启动阶段,App会先通过vkCreateInstance()接口函数创建Instance(实例),然后通过vkEnumeratePhysicalDevices()接口函数查询系统中的物理设备,接着用vkCreateDevice()接口函数根据指定物理设备创建逻辑设备。其中,vkEnumeratePhysicalDevices()接口函数用于枚举物理设备。
另外,根据Vulkan spec(Vulkan标准明细),Vulkan接口在使用时不需要静态暴露接口,接口函数的指针可以通过vkGetInstanceProcAddr()接口函数来获得。其中,vkGetInstanceProcAddr()接口函数可用于获得实例进程地址。从而本示例中,在Android实例的基础上构建Linux下基于Wayland通信协议进行信息传输的Linux系统实例,并对vkGetInstanceProcAddr接口函数所包含的函数指针进行基于Linux系统的Wayland通信协议的扩展,使其能够在Linux系统应用和Linux系统的窗口之间传输缓冲区以及相关的句柄等信息。
参照图3所示,通过对实例Instance接口vkCreateSurface进行扩展,得到扩展后的接口vkCreateWaylandSurfaceKHR,通过扩展后的接口vkCreateWaylandSurfaceKHR,得到Vulkan图形缓冲区VkSurfaceKHR31,该图形缓冲区由两部分组成。
仍然参照图3,图形缓冲区VkSurfaceKHR31的第一部分由BufferQueue派生的WaylandNativeWindow(基于Wayland协议进行通信的Linux原生窗口)构建初始化。初始化过程主要包含创建Wayland窗口系统代理侧对象Wayland_window32(Wayland窗口或前述实施例中的Wayland原生窗口)和Window_surface33(画布窗口),画布窗口可共用Vulkan的驱动器的画布部分(Driver::Surface),通过Window_surface33,建立Vulkan图形缓冲区与Linux系统底层的窗口系统的连接,在连接建立之后,Window_surface33可通过Vulkan的地址获取函数,获取缓冲区对应的索引,进一步获取能够控制缓冲区的句柄(记录为 swapchain_handle37)。同时通过显示存储驱动Gralloc(Graphics Alloc,图形分配)模块,为画布窗口申请长度为3(或其它数量)个Buffer的缓冲区队列34。
图形缓冲区VkSurfaceKHR31的第二部分通过vkCreateSwapchainKHR()接口函数创建记录为VkSwapchainKHR35d的Vulkan交换链)。VkSwapchainKHR35会通过BufferQueue机制接口中获取WaylandNativeWindow(Wayland原生窗口)构建缓冲区数量为3的缓冲区队列34,并将获取的缓冲区队列34中的图形缓冲区内的图像帧纹理转换成vkImage(Vulkan画面),这些vkImage由驱动器层的driver::Swapchain::Image数组来维护,即图3中所示的num_image36数组。数组中元素的最多个数可以与WaylandNativeWindow中构建的缓冲区队列数量相同。num_image 36数组包含多个索引,每个索引对应一个原生窗口的缓冲区(A Native Window Buffer),缓冲区进一步对应用于生成画面(Image)的图像帧纹理。
每当根据Linux应用,需要绘制新的一帧时,先调用swapchain(交换链)部分的vkAcquireNextImageKHR()接口函数获得一个App可用的缓冲区,即前述实施例中的目标缓冲区。该缓冲区由Swapchain中的driver::Swapchain::Image数组的索引表示,在driver::Swapchain::Image数组中,包含多个索引,每个索引对应一个缓冲区。缓冲区的获取过程中,通过回调进入WaylandNativeWindow中的dequeueBuffer(出队缓冲区),从出队的缓冲队列中取得。在从出队缓冲区中获得一个缓冲区之后,可能存在GPU(Graphics Processing Unit,图像处理单元)仍然在操作该缓冲区的情况,因此拿到缓冲区后,还需等返回的semaphore signal(信号标信号)后才能确认该缓冲区真正可用,即处于未占用或未使用状态。基于缓冲区的未占用状态的确认,可以根据Linux应用的待显示信息进行渲染。
渲染完一帧后,将渲染得到的图像帧纹理信息填充在获取的缓冲区中,调用swapchain部分的vkQueuePresentKHR()接口函数,提交缓冲区。在提交时,缓冲区采用索引表示。缓冲区提交过程中,通过回调进入WaylandNativeWindow中的queueBuffer(缓冲区队列),将缓冲区放入缓冲区队列中,等待画布窗口的使用。同时,WaylandNativeWindow会将该缓冲区通过Wayalnd窗口系统代理对象Wayland_window和Window_surface进行提交显示,即,将渲染完成的缓冲区提交给Linux底层的窗口管理系统,完成最终的合成显示。
本公开示例中,实现了Linux系统下结合Wayland协议和Android Vulkan驱动,建立图形窗口缓冲区的机制。同时,本示例通过扩展BufferQueue机制,实现Vulkan渲染Linux应用的待显示信息与Linux窗口系统的渲染显示同步。
需要说明的是,尽管以Vulkan、Wayland作为示例介绍了窗口信息处理方法如上,但本领域技术人员能够理解,本公开应不限于此。事实上,用户完全可根据个人喜好和/或实际应用场景灵活设定用于传输缓冲区信息的接口或模块,或者用于传输信息的协议,只要能够实 现渲染和窗口展示的同步即可。
这样,通过本公开实施例的窗口信息处理方法能够提高窗口信息处理效率,根据本公开上述实施例的缓冲区队列、画布窗口等,能够实现Linux应用的窗口信息渲染和窗口信息展示的同步,提高窗口信息处理效率。
图4示出根据本公开一实施例的窗口信息处理装置的结构框图。如图4所示,该装置可以包括:
待显示信息获取模块41,应用获取Linux应用的待显示信息;
填充模块42,用于将根据待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
提交模块43,用于将目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,提交信息根据图像帧纹理信息的填充操作生成;
转发模块44,用于利用画布窗口,将提交信息转发至原生窗口,使得原生窗口能够根据提交信息获取图像帧纹理信息。
在一种实施方式中,如图5所示,填充模块包括:
目标缓冲区获取单元51,用于根据待显示的信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,目标缓冲区处于未占用状态;
目标缓冲区处理单元52,用于将待显示的信息对应的图像帧纹理信息填充在目标缓冲区。
在一种实施方式中,目标缓冲区获取单元还用于:
根据待显示的信息,获取安卓绘图应用接口驱动器的交换链数组中的目标索引;
确定目标索引在缓冲区队列中对应的缓冲区为目标缓冲区。
在一种实施方式中,如图6所示,提交模块包括:
第一提交单元61,用于将目标索引作为提交信息,提交至安卓绘图应用接口驱动器的画布窗口。
在一种实施方式中,如图7所示,窗口信息处理装置还包括:
第一实例生成模块71,用于根据Linux应用的运行信息,生成安卓绘图应用接口实例;
画布窗口创建模块72,用于通过安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
在一种实施方式中,如图8所示,窗口信息处理装置还包括:
第二示例生成模块81,用于基于安卓绘图应用接口实例,创建Linux系统实例;
运行模块82,用于在Linux系统实例中运行原生窗口。
在一种实施方式中,如图9所示,转发模块包括:
地址确定单元91,用于利用画布窗口的获取地址函数指针,确定Linux系统实例的地址;获取地址函数指针为对画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
提交信息转发单元92,用于根据地址,将提交信息转发至原生窗口。
本公开实施例各装置中的各模块的功能可以参见上述方法中的对应描述,在此不再赘述。
图10示出根据本公开一实施例的窗口信息处理电子设备的结构框图。如图10所示,该窗口信息处理电子设备包括:存储器910和处理器920,存储器910内存储有可在处理器920上运行的计算机程序。处理器920执行该计算机程序时实现上述实施例中的窗口信息处理方法。存储器910和处理器920的数量可以为一个或多个。
该窗口信息处理电子设备还包括:
通信接口930,用于与外界设备进行通信,进行数据交互传输。
如果存储器910、处理器920和通信接口930独立实现,则存储器910、处理器920和通信接口930可以通过总线相互连接并完成相互间的通信。该总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component Interconnect,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
可选的,在具体实现上,如果存储器910、处理器920及通信接口930集成在一块芯片上,则存储器910、处理器920及通信接口930可以通过内部接口完成相互间的通信。
本公开实施例提供了一种计算机可读存储介质,其存储有计算机程序,该程序被处理器执行时实现本公开实施例中提供的方法。
本公开实施例还提供了一种芯片,该芯片包括,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行本公开实施例提供的方法。
本公开实施例还提供了一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行本公开实施例提供的方法。
本公开实施例还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现本公开实施例提供的方法。
本公开实施例还提供了一种计算机程序,该计算机程序被处理器执行时实现本公开实施例提供的方法。
应理解的是,上述处理器可以是中央处理器(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(advanced RISC machines,ARM)架构的处理器。
进一步地,可选的,上述存储器可以包括只读存储器和随机存取存储器,还可以包括非易失性随机存取存储器。该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以包括只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以包括随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本公开的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包括于本公开的至少一个实施例或示例中。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者 隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或隐含地包括至少一个该特征。在本公开的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分。并且本公开的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。
应理解的是,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。上述实施例方法的全部或部分步骤是可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本公开各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。上述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读存储介质中。该存储介质可以是只读存储器,磁盘或光盘等。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到其各种变化或替换,这些都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。

Claims (18)

  1. 一种窗口信息处理方法,包括:
    获取Linux应用的待显示信息;
    将根据所述待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;所述图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
    将所述目标缓冲区的提交信息提交至安卓绘图应用接口驱动器的画布窗口,所述提交信息根据所述图像帧纹理信息的填充操作生成;
    利用所述画布窗口,将所述提交信息转发至所述原生窗口,使得所述原生窗口能够根据所述提交信息获取所述图像帧纹理信息。
  2. 根据权利要求1所述的方法,其中,所述将根据所述待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区,包括:
    根据所述待显示信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,所述目标缓冲区包括处于未占用状态的缓冲区;
    将所述待显示信息对应的图像帧纹理信息填充在所述目标缓冲区。
  3. 根据权利要求2所述的方法,其中,所述根据所述待显示信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,包括:
    根据所述待显示信息,获取安卓绘图应用接口驱动器的交换链数组中的目标索引;
    将所述目标索引在所述缓冲区队列中对应的缓冲区确定为目标缓冲区。
  4. 根据权利要求3所述的方法,其中,所述将所述目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,包括:
    将所述目标索引作为所述提交信息,提交至所述安卓绘图应用接口驱动器的画布窗口。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述方法还包括:
    根据Linux应用的运行信息,生成安卓绘图应用接口实例;
    通过所述安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    基于所述安卓绘图应用接口实例,创建Linux系统实例;
    在所述Linux系统实例中运行所述原生窗口。
  7. 根据权利要求6所述的方法,其中,所述利用所述画布窗口,将所述提交信息转发至所述原生窗口,包括:
    利用所述画布窗口的获取地址函数指针,确定所述Linux系统实例的地址;所述获取地 址函数指针为对所述画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
    根据所述地址,将所述提交信息转发至所述原生窗口。
  8. 一种窗口信息处理装置,包括:
    待显示信息获取模块,应用获取Linux应用的待显示信息;
    填充模块,用于将根据所述待显示信息生成的图像帧纹理信息填充在安卓绘图应用接口驱动器的目标缓冲区;所述图像帧纹理信息用于在基于Linux系统的通信协议进行通信的原生窗口中生成显示画面;
    提交模块,用于将所述目标缓冲区对应的提交信息提交至安卓绘图应用接口驱动器的画布窗口,所述提交信息根据所述图像帧纹理信息的填充操作生成;
    转发模块,用于利用所述画布窗口,将所述提交信息转发至所述原生窗口,使得所述原生窗口能够根据提交信息获取所述图像帧纹理信息。
  9. 根据权利要求8所述的装置,其中,所述填充模块包括:
    目标缓冲区获取单元,用于根据所述待显示信息,获取安卓绘图应用接口驱动器对应的缓冲区队列中的目标缓冲区,所述目标缓冲区处于未占用状态;
    目标缓冲区处理单元,用于将所述待显示信息对应的图像帧纹理信息填充在所述目标缓冲区。
  10. 根据权利要求9所述的装置,其中,所述目标缓冲区获取单元还用于:
    根据所述待显示信息,获取安卓绘图应用接口驱动器的交换链数组中的目标索引;
    确定目标索引在缓冲区队列中对应的缓冲区为目标缓冲区。
  11. 根据权利要求10所述的装置,其中,所述提交模块包括:
    第一提交单元,用于将所述目标索引作为所述提交信息,提交至所述安卓绘图应用接口驱动器的画布窗口。
  12. 根据权利要求8至11中任一项所述的装置,其中,所述装置还包括:
    第一实例生成模块,用于根据Linux应用的运行信息,生成安卓绘图应用接口实例;
    画布窗口创建模块,用于通过所述安卓绘图应用接口实例,创建安卓绘图应用接口的画布窗口。
  13. 根据权利要求12所述的装置,其中,所述装置还包括:
    第二示例生成模块,用于基于所述安卓绘图应用接口实例,创建Linux系统实例;
    运行模块,用于在所述Linux系统实例中运行所述原生窗口。
  14. 根据权利要求13所述的装置,其中,所述转发模块包括:
    地址确定单元,用于利用所述画布窗口的获取地址函数指针,确定所述Linux系统实例的地址;所述获取地址函数指针为对所述画布窗口的实例进程地址获取函数指针进行基于Linux系统的通信协议的扩展后得到的;
    提交信息转发单元,用于根据所述地址,将所述提交信息转发至所述原生窗口。
  15. 一种窗口信息处理电子设备,包括:处理器和存储器,所述存储器中存储指令,所述指令由处理器加载并执行,以实现如权利要求1至7中任一项所述的方法。
  16. 一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的方法。
  17. 一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的方法。
  18. 一种计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的方法。
PCT/CN2022/108722 2021-11-19 2022-07-28 窗口信息处理方法、装置、电子设备及存储介质 WO2023087778A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111372860.4A CN113822962B (zh) 2021-11-19 2021-11-19 窗口信息处理方法、装置、电子设备及存储介质
CN202111372860.4 2021-11-19

Publications (1)

Publication Number Publication Date
WO2023087778A1 true WO2023087778A1 (zh) 2023-05-25

Family

ID=78919290

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/108722 WO2023087778A1 (zh) 2021-11-19 2022-07-28 窗口信息处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN113822962B (zh)
WO (1) WO2023087778A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339900A (zh) * 2023-05-30 2023-06-27 北京麟卓信息科技有限公司 一种跨运行环境的多窗口融合显示方法
CN117149341A (zh) * 2023-10-31 2023-12-01 成都阿加犀智能科技有限公司 一种显示Linux GUI程序的方法、装置、设备及介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822962B (zh) * 2021-11-19 2022-03-18 北京鲸鲮信息系统技术有限公司 窗口信息处理方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902789A (zh) * 2012-09-29 2013-01-30 北京奇虎科技有限公司 改变浏览器窗口显示的内容的显示控制设备及方法
US20170116702A1 (en) * 2015-10-21 2017-04-27 Stephen Viggers Systems and methods for using an opengl api with a vulkan graphics driver
US20190073741A1 (en) * 2017-08-09 2019-03-07 Daniel Herring Systems and Methods for Using EGL with an OPENGL API and a Vulkan Graphics Driver
CN111724293A (zh) * 2019-03-22 2020-09-29 华为技术有限公司 图像渲染方法及装置、电子设备
CN113110910A (zh) * 2021-04-20 2021-07-13 上海卓易科技股份有限公司 一种安卓容器实现的方法、系统及设备
CN113822962A (zh) * 2021-11-19 2021-12-21 北京鲸鲮信息系统技术有限公司 窗口信息处理方法、装置、电子设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268620A (zh) * 2013-04-28 2013-08-28 华为技术有限公司 图形处理方法、图形处理装置及终端设备
CN107450897B (zh) * 2016-06-01 2021-03-02 阿里巴巴集团控股有限公司 图形引擎的跨平台移植方法和装置
US11132973B2 (en) * 2019-02-01 2021-09-28 Forcepoint, LLC System for capturing images from applications rendering video to a native platform with a graphics rendering library
CN113448662A (zh) * 2020-03-27 2021-09-28 海信电子科技(武汉)有限公司 窗口图像显示方法、设备及存储介质
CN113256481A (zh) * 2021-06-21 2021-08-13 腾讯科技(深圳)有限公司 图形处理器中的任务处理方法、装置、电子设备及存储介质
CN113515396B (zh) * 2021-07-09 2024-01-30 北京字节跳动网络技术有限公司 图形渲染方法、装置、电子设备与存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902789A (zh) * 2012-09-29 2013-01-30 北京奇虎科技有限公司 改变浏览器窗口显示的内容的显示控制设备及方法
US20170116702A1 (en) * 2015-10-21 2017-04-27 Stephen Viggers Systems and methods for using an opengl api with a vulkan graphics driver
US20190073741A1 (en) * 2017-08-09 2019-03-07 Daniel Herring Systems and Methods for Using EGL with an OPENGL API and a Vulkan Graphics Driver
CN111724293A (zh) * 2019-03-22 2020-09-29 华为技术有限公司 图像渲染方法及装置、电子设备
CN113110910A (zh) * 2021-04-20 2021-07-13 上海卓易科技股份有限公司 一种安卓容器实现的方法、系统及设备
CN113822962A (zh) * 2021-11-19 2021-12-21 北京鲸鲮信息系统技术有限公司 窗口信息处理方法、装置、电子设备及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339900A (zh) * 2023-05-30 2023-06-27 北京麟卓信息科技有限公司 一种跨运行环境的多窗口融合显示方法
CN116339900B (zh) * 2023-05-30 2023-07-18 北京麟卓信息科技有限公司 一种跨运行环境的多窗口融合显示方法
CN117149341A (zh) * 2023-10-31 2023-12-01 成都阿加犀智能科技有限公司 一种显示Linux GUI程序的方法、装置、设备及介质
CN117149341B (zh) * 2023-10-31 2024-01-05 成都阿加犀智能科技有限公司 一种显示Linux GUI程序的方法、装置、设备及介质

Also Published As

Publication number Publication date
CN113822962A (zh) 2021-12-21
CN113822962B (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
WO2023087778A1 (zh) 窗口信息处理方法、装置、电子设备及存储介质
US10127628B2 (en) Method and system to virtualize graphic processing services
US10635468B2 (en) Displaying graphics for local virtual machine by allocating and mapping textual buffer
TWI531974B (zh) 管理巢狀執行串流的方法和系統
ES2617303T3 (es) Técnicas de comunicación entre procesadores en una plataforma informática de múltiples procesadores
US20200192733A1 (en) Machine learning repository service
CN110262907B (zh) 用于统一应用编程接口和模型的系统和方法
TWI738737B (zh) 使用伴隨記憶體預配置的緩衝器映射方案的電腦實施方法及控制資料傳遞的裝置
WO2023109140A1 (zh) 信息处理方法、装置、电子设备及存储介质
WO2017167127A1 (zh) 一种图形合成方法、窗口设置方法及系统
CN112269603A (zh) 一种在Linux上兼容运行Android应用的图形显示方法与装置
CN111309649B (zh) 一种数据传输和任务处理方法、装置及设备
CN104025185A (zh) 用于使用gpu控制器来预加载缓存的机制
US20140198112A1 (en) Method of controlling information processing apparatus and information processing apparatus
JP5120125B2 (ja) 画像合成システム、表示制御方法、描画処理装置、及び制御プログラム
CN113051047B (zh) 识别安卓系统绘制线程的方法、装置、移动终端及存储介质
US7821521B2 (en) Methods and systems for legacy graphics emulation
WO2018103022A1 (zh) 帧缓存实现方法、装置、电子设备和计算机程序产品
US10733687B2 (en) Method and apparatus for data communication in virtualized environment, and processor
US8402229B1 (en) System and method for enabling interoperability between application programming interfaces
CN114257867A (zh) 视频图像显示方法和装置,计算设备和可读存储介质
WO2023221822A1 (zh) 数据处理方法、电子设备和可读存储介质
US20180300844A1 (en) Data processing
US8539516B1 (en) System and method for enabling interoperability between application programming interfaces
US8593472B1 (en) System and method for accessing a frame buffer via a storage driver

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: 22894321

Country of ref document: EP

Kind code of ref document: A1