Page rendering method and apparatus, and medium and electronic device
The rendering texture is generated through the engine and read and rendered by the native rendering application, which solves the problem that Unity cannot realize some screen rendering and page mixing in native applications, realizes the mixing and interaction between the rendered page and the native page, and enhances the user Experience.
Patent Information
- Application Number
- PCT/CN2024/081512
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-27
- Filing Date
- 2024-03-13
- Publication Date
- 2024-10-31
AI Technical Summary
After being integrated into native applications, the Unity framework cannot realize partial screen rendering, and cannot draw native pages and Unity pages at the same time, and cannot support page switching and sliding, which limits the mixing and interactiveness of the page.
The rendering texture is generated through the engine and notified its storage address to the native rendering application. The native rendering application reads the rendering texture from the storage address for rendering, realizing the mixing arrangement of the rendering page and the native page.
It realizes the mixing and interaction between Unity rendered pages and native pages, supports some screen rendering and page switching, and improves the user experience.
Smart Images

Figure CN2024081512_31102024_PF_FP_ABST
Abstract
Description
Page rendering method, device, medium and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on April 27, 2023, with application number 202310477417.6 and invention name “Page rendering method, device, medium and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of computer technology, and in particular to a page rendering method, device, medium, and electronic device. Background Art
[0004] Unity is a framework for making games that can be integrated into native applications, for example, native applications for iOS, native applications for Android, and so on.
[0005] However, after Unity is integrated into the native application, Unity pages and native application pages cannot be mixed.
[0006] Summary of the Invention
[0007] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0008] In a first aspect, the present disclosure provides a page rendering method, comprising: generating a rendering texture by an engine; notifying a native rendering application capable of page rendering of a storage address of the rendering texture by the engine; and reading the rendering texture from the storage address by the native rendering application and rendering using the rendering texture to obtain a rendered page.
[0009] In a second aspect, the present disclosure provides a page rendering device, comprising an engine and a native rendering application, wherein the native rendering application is a native application capable of page rendering, wherein: the engine is used to generate a rendering texture and notify the native rendering application of the storage address of the rendering texture; the native rendering application is used to read the rendering texture from the storage address and use the rendering texture for rendering to obtain a rendered page.
[0010] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any one of the methods described in the first aspect of the present disclosure.
[0011] In a fourth aspect, the present disclosure provides an electronic device comprising: a storage device storing a computer program; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in the first aspect of the present disclosure.
[0012] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0014] FIG1 shows a schematic diagram of jumping from a native page to a Unity rendered page from a user's perspective in the related art.
[0015] FIG2 is a schematic diagram showing the underlying implementation of jumping from a native page to a Unity rendering page in the related art.
[0016] FIG3 shows a schematic diagram of mixing native pages and rendered pages according to an embodiment of the present disclosure.
[0017] FIG4 shows a flowchart of a page rendering method according to an embodiment of the present disclosure.
[0018] FIG5 shows a flow chart of a page rendering method according to the present disclosure, taking Unity as the engine and Metal of iOS as the native rendering application as an example.
[0019] FIG6 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0020] FIG7 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0021] FIG8 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0022] FIG9 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0023] FIG10 is a schematic block diagram of a page rendering apparatus according to an embodiment of the present disclosure.
[0024] FIG11 is a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0027] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0029] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0031] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0032] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0033] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0035] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0036] Unity is a framework for making games that can be integrated into native applications. However, after integration, since Unity no longer controls the runtime lifecycle, using Unity as a library may not be suitable for all possible use cases. Known limitations after integration include:
[0037] Unity as a library only supports full-screen rendering, not partial-screen rendering.
[0038] It is not possible to load multiple instances of the Unity runtime.
[0039] Third-party plugins (for example, native and managed plugins) may need to be adapted to work with the Unity runtime.
[0040] That is, after integrating Unity into a native application, Unity only supports full-screen rendering and cannot perform partial screen rendering, which leads to:
[0041] Unable to draw native page and Unity page at the same time in the same page
[0042] Even if you change the size of Unity's window, Unity's window will not slide along with the page content.
[0043] The Unity window content cannot support page switching. Page switching can only be performed by displaying one of the native page and the Unity page, or by hiding one of the native page and the Unity page.
[0044] Therefore, in the related art, if you want to switch from the native page of a native application to the Unity-rendered page, you can only jump from the native page to the Unity-rendered page. Figure 1 shows a schematic diagram of this jump from the user's perspective. Figure 2 shows a schematic diagram of the underlying implementation of this jump. As can be seen from Figures 1 and 2, in the related art, the native page of the native application and the Unity-rendered page are in a mutually overlapping mode, and the user can only see one of the two pages in the native application at the same time.
[0045] So, if the user wants to mix the rendered pages rendered by Unity and the native pages (as shown in the mixed diagram in Figure 3), this is not possible according to the current guidance given by Unity, because "Unity as a library" only supports full-screen rendering and does not support rendering in part of the screen.
[0046] The inventors of the present disclosure discovered that the above problem occurs because the external interface provided in the Unity framework is a window (UIWindow), and the native application itself is a window, and there can only be an occlusion relationship between windows. If two windows are placed together, they cannot slide together and cannot appear to be the content of a page.
[0047] Figure 4 shows a flow chart of a page rendering method according to an embodiment of the present disclosure. As shown in Figure 4, the method includes the following steps S41 to S43.
[0048] In step S41 , a rendering texture is generated by the engine.
[0049] The engine can be any type of engine, such as a game engine. It can also be an engine that can render pages but whose rendered pages cannot be intermixed with native application pages. For example, the engine can be the Unity engine or other engines.
[0050] Native applications refer to applications that can run directly on the current operating system.
[0051] Taking the Unity engine as an example, in this step, the rendering texture can be generated in the Unity engine through the RenderTexture technology of the Unity engine.
[0052] After generating the render texture, the engine may store the render texture, for example, in a graphics processing unit (GPU).
[0053] In step S42 , the engine notifies the native rendering application capable of page rendering of the storage address of the rendering texture.
[0054] The storage address of the render texture may be a storage address of the render texture in the GPU.
[0055] The engine can inform the native rendering application of the pointer address of the render texture.
[0056] Native rendering apps are native apps that provide the following capabilities: pages rendered by native rendering apps can be intermixed with other native pages. Intermixing refers to the display of native and rendered pages mixed together.
[0057] For example, on iOS, Metal is a native rendering application. Metal is a low-level graphics programming interface similar to OpenGL ES. Using the corresponding Application Program Interface (API), Metal can directly access the GPU.
[0058] In step S43 , the native rendering application reads the rendering texture from the storage address and uses the rendering texture for rendering to obtain a rendering page.
[0059] Taking Metal as an example, in step S43, Metal can read the rendering texture stored in the pointer address from the GPU pointer address that stores the rendering texture, and then, based on the read rendering texture, Metal's MTKView performs page rendering. In other words, it is equivalent to using Metal's MTKView to render the page and obtain the required rendering page. Since Metal is a rendering application that comes with iOS, it can provide the ability to mix rendering pages with other native pages, thus realizing the mixing of rendering pages and native pages, that is, being able to mix native pages and rendering pages together for display.
[0060] The above technical solution does not directly use the engine to render the page to obtain the rendered page, but first generates a rendering texture through the engine, and then the native rendering application renders the page based on the rendering texture to obtain the rendered page. Since the native rendering application can provide the ability to mix the rendered page with other native pages, the mixing of the rendered page and the native page is achieved.
[0061] FIG5 shows a flow chart of a page rendering method according to the present disclosure, taking Unity as the engine and Metal of iOS as the native rendering application as an example.
[0062] As shown in Figure 5, first, in Unity, a render texture is generated using the RenderTexture technology. This render texture is then stored on the GPU. Then, in Metal, the stored render texture is read from the GPU and the page is rendered using MTKView based on this render texture.
[0063] The above technical solution does not directly use Unity to render the page to obtain the rendered page, but first generates a rendering texture through RenderTexture in Unity, and then uses MTKView in Metal to render the page based on the rendering texture to obtain the rendered page. Since Metal can provide the ability to mix rendered pages with other native pages, the mixing of rendered pages and native pages is achieved.
[0064] In some embodiments, before the engine generates the render texture, the method according to an embodiment of the present disclosure may further include: the native rendering application accessing the scene to be rendered and providing the engine with parameters of the content to be rendered in the scene. In this way, the engine can know which content's render textures need to be generated.
[0065] FIG6 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0066] As shown in Figure 6, first, the native rendering application starts the engine. Then, the engine is initialized, and after the initialization is completed, it notifies the native rendering application that the initialization is complete. Then, the native rendering application enters the scene that needs to be rendered, such as a game scene, and notifies the engine to render. Then, the engine starts the scene that needs to be rendered, and requests the parameters of the content that needs to be rendered from the native rendering application, such as requesting the parameters of the game content that needs to be rendered. Then, the native rendering application calculates the parameters of the content that needs to be rendered, such as the length, height, ID, etc. of the content that needs to be rendered. Then, the engine generates a rendering texture, stores it, and notifies the native rendering application of the storage address of the rendering texture. Then, the native rendering application reads the rendering texture from the storage address and renders based on the rendering texture to obtain a rendering page.
[0067] The above technical solution does not directly use the engine to render the page to obtain the rendered page, but first generates a rendering texture through the engine, and then the native rendering application renders the page based on the rendering texture to obtain the rendered page. Since the native rendering application can provide the ability to mix the rendered page with other native pages, the mixing of the rendered page and the native page is achieved.
[0068] FIG7 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0069] As shown in Figure 7, the native rendering application first receives user gesture information. This gesture information can include at least one of the following: movement, scrolling, clicking, zooming, and so on. For example, if the user gesture is a movement, the touch start information, touch movement direction, and touch end information can be obtained. The same applies to other gesture information. Furthermore, the touch hook function can be used to obtain user gesture information.
[0070] Then, the native rendering application sends the gesture information to the engine. For example, the native rendering application may generate a touch event based on the gesture information and send the generated touch event to the engine.
[0071] The render texture is then updated by the engine based on the gesture information.
[0072] The engine then stores the updated rendering texture and notifies the native rendering application of the storage address.
[0073] Then, the native rendering application updates the rendering page based on the updated rendering texture.
[0074] By adopting the above technical solution, since the engine updates the rendering texture based on gesture information, and the native rendering application updates the rendering page based on the updated rendering texture, it is possible to update the rendering page based on the user's gesture information such as scrolling, clicking, and moving, and realize interaction with the user. For example, it is possible for the user to guide the rendering content (such as game tasks) to run, fight, etc.
[0075] FIG8 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0076] As shown in FIG8 , first, a size change request is received by the native rendering application, wherein the size change request includes a new size of the rendered page, which may include a new length, a new height, etc. of the rendered page.
[0077] The native rendering application then sends the size change request to the engine.
[0078] The render texture is then updated by the engine based on the size change request.
[0079] The engine then stores the updated rendering texture and notifies the native rendering application of the storage address.
[0080] Then, the native rendering application updates the rendering page based on the updated rendering texture.
[0081] By adopting the above technical solution, since the engine updates the rendering texture based on the size change request, and the native rendering application updates the rendering page based on the updated rendering texture, the size change of the rendering page can be realized and interaction with the user can be achieved.
[0082] FIG9 shows another flowchart of a page rendering method according to an embodiment of the present disclosure.
[0083] As shown in Figure 9, first, the native rendering application receives a rendering content change request, where the rendering content change request includes new rendering content, such as new game content. The native rendering application then sends the rendering content change request to the engine. The engine then updates the rendering texture based on the rendering content change request. The engine then stores the updated rendering texture and notifies the native rendering application of the storage address. The native rendering application then updates the rendering page based on the updated rendering texture.
[0084] By adopting the above technical solution, since the engine updates the rendering texture based on the rendering content change request, and the native rendering application updates the rendering page based on the updated rendering texture, page switching of the rendering page can be realized and interaction with the user can be achieved.
[0085] Figure 10 is a schematic block diagram of a page rendering device according to an embodiment of the present disclosure. As shown in Figure 10, the page rendering device includes an engine 101 and a native rendering application 102, wherein the native rendering application 102 is a native application capable of page rendering. The engine 101 is configured to generate a rendering texture and notify the native rendering application of the storage address of the rendering texture; the native rendering application 102 is configured to read the rendering texture from the storage address and use the rendering texture for rendering to obtain a rendered page.
[0086] The above technical solution does not directly use the engine to render the page to obtain the rendered page, but first generates a rendering texture through the engine, and then the native rendering application renders the page based on the rendering texture to obtain the rendered page. Since the native rendering application can provide the ability to mix the rendered page with other native pages, the mixing of the rendered page and the native page is achieved.
[0087] In some embodiments, the native rendering application 102 is further configured to: before the engine 101 generates a rendering texture, enter a scene to be rendered, and provide parameters of the content to be rendered in the scene to the engine 101 .
[0088] In some embodiments, the native rendering application 102 is further used to receive user gesture information and send the gesture information to the engine 101; the engine 101 is further used to update the rendering texture based on the gesture information; and the native rendering application 102 is further used to update the rendering page based on the updated rendering texture.
[0089] In some embodiments, the gesture information includes at least one of the following: moving, scrolling, clicking, and zooming.
[0090] In some embodiments, the native rendering application 102 is further configured to receive a size change request and send the size change request to the engine 101, wherein the size change request includes a new size of the rendering page; the engine 101 is further configured to update the rendering texture based on the size change request; and the native rendering application 102 is further configured to update the rendering page based on the updated rendering texture.
[0091] In some embodiments, the native rendering application 102 is further used to receive a rendering content change request and send the rendering content change request to the engine 101, wherein the rendering content change request includes new rendering content; the engine 101 is further used to update the rendering texture based on the rendering content change request; and the native rendering application 102 is further used to update the rendering page based on the updated rendering texture.
[0092] In some embodiments, the storage address of the rendering texture is a pointer address of a graphics processor.
[0093] Reference is now made to FIG11, which illustrates a schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG11 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.
[0094] As shown in Figure 11, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0095] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 11 shows the electronic device 600 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0096] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0097] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0098] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0099] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0100] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: generates a rendering texture by an engine; notifies a native rendering application capable of page rendering of the storage address of the rendering texture by the engine; and the native rendering application reads the rendering texture from the storage address and uses the rendering texture for rendering to obtain a rendered page.
[0101] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0104] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0105] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] According to one or more embodiments of the present disclosure, Example 1 provides a page rendering method, including: generating a rendering texture by an engine; notifying a native rendering application capable of page rendering of a storage address of the rendering texture by the engine; and reading the rendering texture from the storage address by the native rendering application and rendering using the rendering texture to obtain a rendered page.
[0107] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein, before the engine generates the rendering texture, it also includes: the native rendering application enters the scene that needs to be rendered, and provides the parameters of the content that needs to be rendered in the scene to the engine.
[0108] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1 or 2, further including: the native rendering application receiving user gesture information; the native rendering application sending the gesture information to the engine; the engine updating the rendering texture based on the gesture information; and the native rendering application updating the rendering page based on the updated rendering texture.
[0109] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein the gesture information includes at least one of the following: moving, scrolling, clicking, and zooming.
[0110] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1 or 2, further including: the native rendering application receives a size change request, wherein the size change request includes a new size of the rendering page; the native rendering application sends the size change request to the engine; the engine updates the rendering texture based on the size change request; and the native rendering application updates the rendering page based on the updated rendering texture.
[0111] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1 or 2, further including: the native rendering application receives a rendering content change request, wherein the rendering content change request includes new rendering content; the native rendering application sends the rendering content change request to the engine; the engine updates the rendering texture based on the rendering content change request; and the native rendering application updates the rendering page based on the updated rendering texture.
[0112] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein the storage address of the rendering texture is a pointer address of a graphics processor.
[0113] According to one or more embodiments of the present disclosure, Example 8 provides a page rendering device, which includes an engine and a native rendering application, wherein the native rendering application is a native application capable of page rendering, wherein: the engine is used to generate a rendering texture and notify the native rendering application of the storage address of the rendering texture; the native rendering application is used to read the rendering texture from the storage address and use the rendering texture for rendering to obtain a rendered page.
[0114] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1-7 when executed by a processing device.
[0115] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.
[0116] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0117] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0118] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A page rendering method, include: Render textures are generated by the engine; The engine notifies a native rendering application capable of page rendering of a storage address of the rendering texture; The native rendering application reads the rendering texture from the storage address and uses the rendering texture for rendering to obtain a rendering page.
2. The method according to claim 1, in, Before the engine generates the rendering texture, the method further includes: The native rendering application enters the scene that needs to be rendered, and provides parameters of the content that needs to be rendered in the scene to the engine.
3. The method according to claim 1 or 2, in, The method further comprises: The native rendering application receives gesture information of the user; The native rendering application sends the gesture information to the engine; The engine updates the rendering texture based on the gesture information; and The native rendering application updates the rendering page based on the updated rendering texture.
4. The method according to claim 3, in, The gesture information includes at least one of the following: moving, scrolling, clicking, and zooming.
5. The method according to claim 1 or 2, in, The method further comprises: Receiving, by the native rendering application, a size change request, wherein the size change request includes a new size of the rendered page; The native rendering application sends the size change request to the engine; updating, by the engine, the render texture based on the size change request; and The native rendering application updates the rendering page based on the updated rendering texture.
6. The method according to claim 1 or 2, in, The method further comprises: The native rendering application receives a rendering content change request, wherein the rendering content change request includes new rendering content; The native rendering application sends the rendering content change request to the engine; The engine updates the rendering texture based on the rendering content change request; and The native rendering application updates the rendering page based on the updated rendering texture.
7. The method according to claim 1, in, The storage address of the rendering texture is a pointer address of the graphics processor.
8. A page rendering device, comprising an engine and a native rendering application, wherein the native rendering application is a native application capable of performing page rendering, include: The engine is configured to generate a rendering texture and notify the native rendering application of a storage address of the rendering texture; The native rendering application is used to read the rendering texture from the storage address and use the rendering texture for rendering to obtain a rendering page.
9. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processing device, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, include: a storage device having a computer program stored thereon; A processing device for executing the computer program in the storage device to realize the claim Request the steps of any one of the methods described in 1-7.
Citation Information
Patent Citations
Browser engine switching method and device and equipment
CN113591000A
Image rendering method and device, electronic equipment and storage medium
CN115767182A
Image rendering method and device, electronic equipment and storage medium
CN115908097A
Page rendering method and device, medium and electronic equipment
CN116492679A
Scheduling image composition in a processor based on overlapping of an image composition process and an image scan-out operation for displaying a composed image
US20210109346A1
