CN110457102A - Blur method, rendering method and the calculating equipment of visual object - Google Patents

Blur method, rendering method and the calculating equipment of visual object Download PDF

Info

Publication number
CN110457102A
CN110457102A CN201910683994.4A CN201910683994A CN110457102A CN 110457102 A CN110457102 A CN 110457102A CN 201910683994 A CN201910683994 A CN 201910683994A CN 110457102 A CN110457102 A CN 110457102A
Authority
CN
China
Prior art keywords
fuzzy
visual object
texture map
window
region
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910683994.4A
Other languages
Chinese (zh)
Other versions
CN110457102B (en
Inventor
曹思源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Shenzhiduo Technology Co Ltd
Original Assignee
Wuhan Shenzhiduo Technology Co Ltd
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 Wuhan Shenzhiduo Technology Co Ltd filed Critical Wuhan Shenzhiduo Technology Co Ltd
Priority to CN201910683994.4A priority Critical patent/CN110457102B/en
Priority to CN202210614578.0A priority patent/CN114924824B/en
Publication of CN110457102A publication Critical patent/CN110457102A/en
Application granted granted Critical
Publication of CN110457102B publication Critical patent/CN110457102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04804Transparency, e.g. transparent or translucent windows

Abstract

The invention discloses a kind of blur methods of visual object, it is executed in calculating equipment, visual object has fuzzy subobject, and the method comprising the steps of: obtaining the pixel value of visual object region from frame buffer zone, generates the texture map of the fuzzy subobject of the visual object;Fuzzy Processing is carried out to texture map, obtains background texture map;Background texture map is write back to the corresponding region of frame buffer zone;Visual object is drawn, to generate the prospect texture map of the visual object;Background texture map is carried out Alpha with prospect texture map to mix, so that the visual object rendered shows blur effect.The present invention discloses corresponding calculating equipment together.

Description

Blur method, rendering method and the calculating equipment of visual object
Technical field
The present invention relates to graphical interfaces field of display technology more particularly to a kind of blur methods of visual object, rendering side Method and calculating equipment.
Background technique
Window manager is the application program for managing window, such as can control the appearance of window, in screen Display position and the method for providing a user action pane etc..Visually typically window provides window manager The title bar and frame of customization, title bar would generally icon, title and the minimums of display window, maximization, closing Equal buttons.In Linux desktop environment, user can be the relevant technology of X11 or by way of being specified by window manager Customize Headers column and frame.
In order to keep desktop more beautiful, easy-to-use, user wishes that the background of title bar window and frame can be with bottom of window Content mix, show translucent dynamic fuzzy effect.When the content of bottom of window changes, title bar window Background and frame also can correspondingly carry out dynamic change.
Currently, under Linux desktop environment, most of window manager not dynamic of support window title bar and frame Blur effect;For a small number of window managers for supporting dynamic fuzzy effect, customization, aesthetics are poor, it is difficult to meet and use Family requires.For example, the window manager KWin under KDE desktop environment only can be realized the dynamic analog to all title bar windows Paste, can not obscure some or certain several windows with customizing, also not support the dynamic fuzzy of full window ranges.This Outside, KWin can not also customize the shape of the fuzzy region of single window, can not (such as window is cut to the visual element except window Change component, window preview component etc.) it is obscured.
Summary of the invention
For this purpose, the present invention provides the blur method of visual object a kind of, rendering method and calculates equipment, to try hard to solve or At least alleviate above there are the problem of.
According to the first aspect of the invention, a kind of blur method of visual object is provided, is executed in calculating equipment, institute Visual object is stated with fuzzy subobject, which comprises the pixel of visual object region is obtained from frame buffer zone Value, generates the texture map of the fuzzy subobject of the visual object;Fuzzy Processing is carried out to the texture map, obtains background material Figure;The background texture map is write back to the corresponding region of the frame buffer zone;The visual object is drawn, it is described visual to generate The prospect texture map of object;The background texture map is carried out Alpha with the prospect texture map to mix, so that is rendered can Blur effect is showed depending on object.
Optionally, in the blur method of visual object according to the present invention, visual object includes: window, windows exchange Component, window preview component, workspace preview component.
Optionally, in the blur method of visual object according to the present invention, Fuzzy Processing is carried out to the texture map, is obtained Include: that Fuzzy Processing is carried out to the texture map to the step of background texture map, obtains fuzzy texture map;It is described visual right to obtain The fuzzy region exposure mask is mixed with the fuzzy texture map, obtains the background material by the fuzzy region exposure mask of elephant Figure.
Optionally, in the blur method of visual object according to the present invention, the pixel value includes the color value of pixel And transparence value, the texture map include Color Channel figure and transparency channel figure;It is described that fuzzy place is carried out to the texture map The step of managing, obtaining background texture map includes: to carry out Fuzzy Processing to the Color Channel figure, obtains fuzzy texture map;By institute It states fuzzy region exposure mask to be mixed with the transparency channel figure, obtains background texture map.
Optionally, in the blur method of visual object according to the present invention, fuzzy place is carried out to the Color Channel figure The step of reason includes: to carry out convolution to the Color Channel figure using preset convolution kernel.
Optionally, in the blur method of visual object according to the present invention, fuzzy region exposure mask is fuzzy to be used to indicate The bitmap in region, and the pixel value of fuzzy region is 1;The fuzzy region exposure mask is mixed with the transparency channel figure The step of include: that the pixel value of corresponding position by the fuzzy region exposure mask Yu the transparency channel figure is done and operation.
According to the second aspect of the invention, a kind of rendering method is provided, is executed in calculating equipment, comprising: will send The visual object of request and the visual object with fuzzy subobject are redrawn as visual object to be redrawn;According to display layer The bottom-up sequence of grade renders each visual object to be redrawn, wherein when visual object to be redrawn has fuzzy son right As when, the visual object is obscured according to above-mentioned blur method, so that blur effect is presented in the visual object that renders.
According to the third aspect of the present invention, a kind of calculating equipment is provided, comprising: at least one processor;Be stored with The memory of program instruction, described program instruction include window manager;When the window manager is read by the processor And when executing, so that described calculate the blur method and rendering side as described above that equipment executes visual object as described above Method.
According to the fourth aspect of the present invention, a kind of readable storage medium storing program for executing for being stored with program instruction is provided, when the journey When sequence instruction is read and executed by calculating equipment, so that the blur method for calculating equipment and executing visual object as described above With rendering method as described above.
The blur method of visual object of the invention realizes visual object by the way that fuzzy subobject is arranged for visual object It is fuzzy, that is, fuzzy subobject is set to need to carry out fuzzy visual object, does not need to carry out fuzzy visual object then not Fuzzy subobject is set, so as to customize, selectively obscures some or certain several visual objects.
On the basis of being provided with fuzzy subobject, the dynamic analog of visual object can be realized by fuzzy subobject Paste.Specifically, the pixel value of visual object region is obtained from frame buffer zone, it is right as the texture map of fuzzy subobject The texture map carries out Fuzzy Processing, obtains background texture map.Then, by the prospect texture map of the background texture map and visual object Alpha mixing is carried out, so that the visual object rendered shows blur effect.Since the texture map of fuzzy subobject is by visual The pixel value of object region generates, thus the fuzzy of entire visual object region may be implemented in blur method of the invention, Visually more beautiful, user experience is more preferable.
Further, visual object of the invention can be window, windows exchange component, window preview component, workspace Preview component etc., so that the various visual elements managed window manager obscure.
Further, blur method of the invention can be to need to carry out fuzzy visual object setting fuzzy region to cover Film, fuzzy region exposure mask can define any shape.The texture map of fuzzy subobject is cut out by fuzzy region exposure mask It cuts, the available background texture map with target shape, to realize the customizable of the fuzzy region of single visual object Property.
Based on the blur method of visual object of the invention, the present invention also provides a kind of rendering methods, can be every in rendering It when one frame desktop picture, is rendered using conventional method and does not need to carry out fuzzy visual object, using fuzzy side of the invention Method needs to carry out fuzzy visual object the visual object of fuzzy subobject (be provided with) to render, make to render it is each can The blur effect of customization is showed depending on object.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical Component or element.
Fig. 1 shows the schematic diagram according to an embodiment of the invention for calculating equipment 100;
Fig. 2 shows the flow charts of rendering method 200 according to an embodiment of the invention;
Fig. 3 shows the schematic diagram of the desktop according to an embodiment of the invention including window A, B, C, D;
Fig. 4 shows the schematic diagram of window stack corresponding to desktop shown in Fig. 3;
Fig. 5 shows the schematic diagram of Actor tree structure corresponding to desktop shown in Fig. 3;
Fig. 6 shows the flow chart of the blur method 600 of visual object according to an embodiment of the invention;
Fig. 7 shows the schematic diagram of the blurring process of a visual object according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Aiming at the problems existing in the prior art, the present invention provides the blur method and rendering method of a kind of visual object, Customization to realize visual object is fuzzy, and the visual object on desktop is made to show the vision of more harmonious, beautiful modernization Effect improves user experience.
The blur method and rendering method of visual object of the invention execute in calculating equipment.It calculates equipment and can be and appoint Anticipating has the equipment of storage and computing capability, such as the computer for the personal configuration such as can be desktop computer, laptop, It is also possible to the higher computer of the hardware configurations such as work station, server, can also be that mobile phone, tablet computer, intelligence are wearable The mobile terminals such as equipment, but not limited to this.
Fig. 1 shows the schematic diagram according to an embodiment of the invention for calculating equipment 100.It should be noted that Fig. 1 institute The calculating equipment 100 shown is only an example, in practice, the fuzzy of visual object for carrying out the present invention, rendering method The calculating equipment equipment that can be disposable type, hardware configuration situation can be identical as calculating equipment 100 shown in FIG. 1, It can also be different.Fuzzy, rendering method calculating equipment for carrying out the present invention can set calculating shown in FIG. 1 in practice Standby 100 hardware component is increased or is deleted, and the present invention is to calculating the particular hardware configuration situation of equipment with no restrictions.
As shown in Figure 1, calculating equipment 100 in basic configuration 102 and typically comprising system storage 106 and one Or multiple processors 104.Memory bus 108 can be used for the communication between processor 104 and system storage 106.
Depending on desired configuration, processor 104 can be any kind of processing, including but not limited to: microprocessor (μ P), microcontroller (μ C), digital information processor (DSP) or any combination of them.Processor 104 may include such as The cache of one or more rank of on-chip cache 110 and second level cache 112 etc, processor core 114 and register 116.Exemplary processor core 114 may include arithmetic and logical unit (ALU), floating-point unit (FPU), Digital signal processing core (DSP core) or any combination of them.Exemplary Memory Controller 118 can be with processor 104 are used together, or in some implementations, and Memory Controller 118 can be an interior section of processor 104.
Depending on desired configuration, system storage 106 can be any type of memory, including but not limited to: easily The property lost memory (RAM), nonvolatile memory (ROM, flash memory etc.) or any combination of them.System storage Device 106 may include operating system 120, one or more is using 122 and program data 124.In some embodiments, It may be arranged to be executed instruction by one or more processors 104 using program data 124 on an operating system using 122.
Calculating equipment 100 can also include facilitating from various interface equipments (for example, output equipment 142, Peripheral Interface 144 and communication equipment 146) to basic configuration 102 via the communication of bus/interface controller 130 interface bus 140.Example Output equipment 142 include graphics processing unit 148 and audio treatment unit 150.They can be configured as facilitate via One or more port A/V 152 is communicated with the various external equipments of such as display or loudspeaker etc.Outside example If interface 144 may include serial interface controller 154 and parallel interface controller 156, they, which can be configured as, facilitates Via one or more port I/O 158 and such as input equipment (for example, keyboard, mouse, pen, voice-input device, touch Input equipment) or the external equipment of other peripheral hardwares (such as printer, scanner etc.) etc communicated.Exemplary communication is set Standby 146 may include network controller 160, can be arranged to convenient for via one or more communication port 164 and one A or multiple other calculate communication of the equipment 162 by network communication link.
Network communication link can be an example of communication media.Communication media can be usually presented as in such as carrier wave Or computer readable instructions, data structure, program module in the modulated data signal of other transmission mechanisms etc, and can To include any information delivery media." modulated data signal " can such signal, one in its data set or more It is a or it change can the mode of encoded information in the signal carry out.As unrestricted example, communication media can be with Wired medium including such as cable network or private line network etc, and it is such as sound, radio frequency (RF), microwave, infrared (IR) the various wireless mediums or including other wireless mediums.Term computer-readable medium used herein may include depositing Both storage media and communication media.
It include window manager 128 using 122 in calculating equipment 100 according to the present invention.Window manager 128 is For managing the application program of window, such as it can control the appearance of window, the display position in screen and to user The method etc. of action pane is provided.It in an embodiment of the present invention, include for executing wash with watercolours of the invention in window manager 128 The instruction of dyeing method 200 and blur method 600, the instruction can indicate that processor 104 executes 200 He of rendering method of the invention Blur method 600, when rendering each frame desktop picture, rendered using conventional method do not need to carry out it is fuzzy visual right As being rendered using blur method 600 of the invention and needing to carry out fuzzy visual object, make each visual object rendered Show the blur effect of customization.
It should be noted that window manager 128 can execute rendering method 200 and blur method 600, but the present invention couple The development process of window manager 128 is with no restrictions.Window manager 128 can be the new window management of entirely autonomous research and development Device, the KWin being also possible under Mutter, KDE desktop environment under existing window manager, such as GNOME desktop environment It is improved on equal window managers, that is, modified in existing window manager, add certain codes, be allowed to support this hair Bright rendering method 200 and blur method 600.
According to a kind of embodiment, window manager 128 is the improvement to the window manager of Mutter framework.Mutter window Mouth manager relies on Clutter technology to realize, Clutter is the shape library for being used for hardware-accelerated user interface, is used to Create quick, visual effect graphic user interface abundant.And Clutter relies on this OpenGL of cogl and encapsulates library, in order to mention For maximum compatibility, the function of cogl exposure is relatively limited, the case where especially for needing OpenGL to extend.Therefore, it is The Mutter window manager is set to can be realized rendering method 200 and blur method 600 of the invention, the present invention is Mutter Following improvement:
1, cogl is modified, can support the function of this OpenGL ES2.0API of glCopyTexSubImage2D. Specifically, texture_2d_copy_sub_ can be added in the material of cogl processing driving (CoglDriverVtable) This API of image, the API are used to copy from frame buffer zone (framebuffer) content (pixel value) in specified region to working as In the texture map (texture) of preceding binding.
In addition, in the virtual table cogl_texture_pixmap_x11_vtable of material, (function table includes one group General OpenGL material handles function) in handle function, such as Fuzzy Processing function, Alpha required for the definition present invention Mixed function etc..
It can be from current frame by setting texture_2d_copy_sub_image and definition process function, cogl The content drawn is taken out in buffer area as texture map, then texture map is obscured, blendes together (composite) etc. Reason provides function basis to execute rendering method 200 and blur method 600 of the invention.
2, Clutter is modified, makes to need to carry out fuzzy visual object all to be redrawn in each frame.
The design of Clutter is carried out using Actor as unit, and each visual object corresponds to Actor.Visually Windows exchange component, window preview component, the workspace preview component etc. that object is provided for example including window, window manager, But not limited to this.There is hierarchical relationship, the Actor of top layer entitled Stage, each Actor can have arbitrarily between Actor The sub- Actor of quantity.
Specifically, in order to enable Clutter to support rendering method 200 and blur method 600, Ke Yi of the invention A special Actor class is defined in Clutter, is denoted as MetaBlurActor (fuzzy class).In addition, defining visual object Attribute _ NET_WM_DEEPIN_BLUR_REGION_MASK (fuzzy region exposure mask), the value of the attribute is one, and be used to indicate can Depending on the bitmap of the fuzzy region of object, and the pixel value of fuzzy region is 1.
It can be to need to carry out fuzzy visual object Actor to be arranged one based on fuzzy class MetaBlurActor MetaBlurActor subobject (hereinafter referred to fuzzy subobject), for the visual object to be marked, so that window pipe Reason device can the drafting stage of every frame identify it is in need carry out fuzzy visual object, guarantee these visual objects every One frame can all be redrawn.It is possible to further realize corresponding visual object by fuzzy subobject MetaBlurActor The dynamic fuzzy of Actor.Carrying out fuzzy specific steps to visual object by fuzzy subobject will be in fuzzy side hereafter It is described in detail in method 600.
It can be to need to carry out fuzzy visual object based on _ NET_WM_DEEPIN_BLUR_REGION_MASK attribute Fuzzy region exposure mask is set, and fuzzy region exposure mask can define any shape.By fuzzy region exposure mask come to fuzzy subobject Texture map cut, the available background texture map with target shape, to realize the mould of single visual object Paste the customizability in region.The concrete application step of fuzzy region exposure mask will be described in detail in blur method 600 hereafter.
The above-mentioned Mutter window manager that is revised as carried out to cogl and Clutter executes rendering method of the invention 200 and the function that provides the foundation of blur method 600 support.That is, can write out on the basis of above-mentioned modification for executing The program instruction of rendering method 200 and blur method 600, so that Mutter window manager is able to carry out rendering side of the invention Method 200 and blur method 600.
The development of window manager 128 is illustrated by taking Mutter window manager as an example above.But this field skill Art personnel are appreciated that for executing window manager 128 of the invention in addition to can be to existing Mutter window management Except the improvement of device, the improvement of other existing window managers can also be, be also possible to the completely new of entirely autonomous research and development Window manager, the present invention to the development process of window manager 128 with no restrictions.
Fig. 2 shows the flow charts of rendering method 200 according to an embodiment of the invention.Method 200 is calculating equipment It is executed in (such as aforementioned computing device 100), specifically, method 200 is executed by the window manager in calculating equipment.It needs Bright, rendering method 200 can be recycled according to preset frame per second and be executed for rendering a frame desktop picture.For example, setting Frame per second is 60Hz, then per second to refresh 60 frame desktop pictures, every frame desktop picture is all made of method 200 to render.
As shown in Fig. 2, method 200 starts from step S210.
In step S210, the visual object for redrawing request will be had sent and visual object with fuzzy subobject as Visual object to be redrawn.
According to a kind of embodiment, visual object is that the window display area of desktop is (occupied after i.e. will be window maximized Screen area) in the object with visual display effect.The window that visual object is provided for example including window, window manager Changeover module, window preview component, workspace preview component etc., but not limited to this.
Fig. 3 shows the schematic diagram that one includes the desktop of tetra- windows of A, B, C, D, and each window is one visual Object.It should be noted that it is succinct for attached drawing and explanatory note, window visual object is illustrated only in Fig. 3, is not shown The other kinds of visual objects such as windows exchange component, window preview component.
Window manager generallys use window stack to manage the window having already turned on, and (i.e. user is current for current active window The window operated) it is located at the top of window stack, other windows are then arranged according to the operation order of window, user's operation More rearward, position of the window in window stack is closer to the top of window stack for the time sequencing of window.Multiple windows are in desktop Upper to show it is possible that being laminated, lower windows may be blocked by parent window, be covered.Window stack can also be used for indicating window Display level, the window closer to window stack top, display level it is higher.The window on window stack top is current active window Mouthful, show that level highest, content are fully displayed, will not be blocked by other windows.In desktop shown in Fig. 3, window C is The window that user is currently being operated, as current active window.
Fig. 4 shows window stack corresponding to desktop shown in Fig. 3.As shown in figure 4, current active window C is located at window The top of stack, other windows A, B, D are arranged successively in window stack according to the sequencing being user-operably.
In the window manager of Mutter framework, using Actor come managing visual object, each visual object corresponds to One Actor.There is hierarchical relationship, the entitled Stage of the Actor of top layer corresponds to entire window display area between Actor. Each Actor can have any number of sub- Actor.
Fig. 5 shows the schematic diagram of Actor tree structure corresponding to window display area shown in Fig. 3.Such as Fig. 5 institute Show, window A~D corresponds respectively to Actor_A~Actor_D, and Actor_A~Actor_D is top-level windows RootActor The sub- Actor of (i.e. Stage).In desktop shown in Fig. 3, window C, window D are to need to carry out fuzzy visual object, accordingly Fuzzy subobject MetaBlurActor_C, MetaBlurActor_D is arranged in ground, respectively Actor_C, Actor_D, to realize The dynamic fuzzy of window C, window D.
The display state of visual object on the table can change with the interactive operation of user.When user is to visual When object is operated, such as dragging window, adjustment window size, switching current active window (change the display layer of window Grade), display/hide window preview component etc. whens, correspondingly visual object, which can issue, redraws request, and window manager is requested to redraw The visual object, so that visual object shows visual effect corresponding with user's operation.
According to a kind of embodiment, the Actor of visual object can by window manager send queue_redraw (_ With_clip) message initiates to redraw request.Redrawing request includes clip information, that is, area information to be redrawn.To be redrawn Region is a rectangular area, and area information to be redrawn can be the information shaped like (x, y, width, height), wherein x, Y is respectively the horizontal axis of the pixel in the rectangular area upper left corner, ordinate of orthogonal axes, width, height be respectively rectangular area width and It is high.After window manager redraws request receive that visual object sends comprising clip information, in subsequent step S220, The region to be redrawn of the visual object can be redrawn.It should be noted that redrawing for sub- Actor can also cause father Actor Redraw.
Other than having sent and redrawing the visual object of request, window manager also identifies institute in the drafting stage of every frame There is the visual object Actor with fuzzy subobject MetaBlurActor, using these visual objects as to be redrawn visual right As being redrawn.
For example, window A is switched to current active window by user in desktop shown in Fig. 3, correspondingly, window A's Actor will redraw request based on user's operation initiation, and window A is visual object to be redrawn.It is obscured in addition, window C has With fuzzy subobject MetaBlurActor_D, i.e. window C, window D are by subobject MetaBlurActor_C, window D It needs to carry out fuzzy visual object, correspondingly, window C, window D are visual object to be redrawn.
It has been determined after the visual object redrawn in step S210, has executed step S220.
In step S220, each visual object to be redrawn is rendered according to the display bottom-up sequence of level, wherein When the visual object wait redraw has fuzzy subobject, the blur method 600 of visual object according to the invention can to this It is obscured depending on object, so that blur effect is presented in the visual object rendered.
Display level is for indicating each visual object in the stacking situation of window display area, the display layer of visual object Grade is higher, and the display content of the visual object is more complete, will not more be blocked by other visual objects.When visual object is window When, the display level of window, the display layer of the window (i.e. current active window) on window stack top can be indicated with window stack Grade highest.
According to a kind of embodiment, in the render process of step S220, each visual object both corresponds to an off screen Frame buffer zone (offscreen framebuffer), is stored with the texture map of visual object in off screen frame buffer zone, in texture map The pixel value of each pixel including visual object.Each visual object can be respectively completed drafting, drawing result is written respective Texture map in.Then, according to the display bottom-up sequence of level, the texture map of each visual object is sequentially written in frame and is delayed It rushes in the corresponding position of area (framebuffer), to complete the rendering of present frame.
In step S220, visual object to be redrawn can be divided into two classes, one kind be do not need to carry out it is fuzzy visual Object (is not provided with the visual object of fuzzy subobject), another kind of (to be provided with to need to carry out fuzzy visual object The visual object of fuzzy subobject), the method for drafting different from of these two types of visual objects.
For not needing to carry out fuzzy multiple visual objects, upper no strict sequence, Ke Yifen are being drawn Not, it is concurrently drawn.
For needing to carry out fuzzy multiple visual objects, since it needs to carry out the dynamic fuzzy of background, it is therefore desirable to It completes to draw according to the display bottom-up sequence of level, that is, only when the visual object (lower layer, lower layer of a certain visual object Visual object be the visual object background) draw after, just can star the drafting of the visual object.In drawing process In, 600 the visual object is obscured by the following method, so that the visual object visually shows fuzzy effect Fruit.
Fig. 6 shows the flow chart of the blur method 600 of visual object according to an embodiment of the invention.Method 600 It is executed in calculating equipment (such as aforementioned computing device 100), specifically, method 600 is by the window manager in calculating equipment It executes, for being obscured to single visual object.As shown in fig. 6, method 600 starts from step S610.
In step S610, the pixel value of visual object region is obtained from frame buffer zone, generates the visual object Fuzzy subobject texture map.
Frame buffer zone, that is, framebuffer is based on frame buffer zone wherein being stored with the pixel value of all pixels point on screen The pixel value of middle storage can show corresponding image on the screen.
According to a kind of embodiment, in step S610, it is first determined the region where visual object determines visual object The screen area covered.Then, it from the pixel value for obtaining all pixels point in the screen area in frame buffer zone, stores to this It is raw in the off screen frame buffer zone (offscreen framebuffer) of the fuzzy subobject (MetaBlurActor) of visual object At the texture map of the fuzzy subobject.
According to a kind of embodiment, pixel value includes the color value (R, G, channel B value) and transparence value (A channel of pixel Value), correspondingly, the texture map of the fuzzy subobject of generation includes Color Channel figure (R, G, channel B figure) and transparency channel figure (A channel figure) is stored with the color value of each pixel in Color Channel figure, is stored with the saturating of each pixel in transparency channel figure Brightness value.
Then, in step S620, Fuzzy Processing is carried out to texture map, obtains background texture map.
According to a kind of embodiment, step S620 includes fuzzy and two processing steps of cutting.
In Fuzzy Processing step, Fuzzy Processing is carried out to texture map, obtains fuzzy texture map.Specifically, to texture map In Color Channel figure carry out Fuzzy Processing, for example, using preset convolution kernel to Color Channel figure carry out convolution it is (right respectively RGB channel figure carries out convolution), obtain fuzzy texture map.Fuzzy texture map includes R, G, the channel B figure after Fuzzy Processing.
It should be noted that specific algorithm used by Fuzzy Processing of the present invention to Color Channel figure is with no restrictions, Such as can be Gaussian Blur algorithm, mean value fuzzy algorithmic approach, median filtering algorithm etc., but not limited to this.It is obscured for different Processing Algorithm, the weighted value of each position may be different in the size and convolution kernel of the convolution kernel of setting.
After Fuzzy Processing step, executes and cut processing step.In cutting processing step, the mould of visual object is obtained Area mask is pasted, fuzzy region exposure mask is mixed with fuzzy texture map, obtains background texture map.Specifically, by confusion region Domain exposure mask is mixed with the transparency channel figure (A channel figure) in texture map, obtains background texture map.Background texture map includes Mixed transparency channel figure and aforementioned fuzzy texture map.
As previously mentioned, fuzzy region exposure mask is an attribute of visual object.For needing to carry out the visual of Fuzzy Processing Object, fuzzy region exposure mask are the bitmaps of a fuzzy region for being used to indicate visual object, and fuzzy region can be defined as appointing It anticipates shape, the pixel value in fuzzy region is 1.According to a kind of embodiment, by the phase of fuzzy region exposure mask and transparency channel figure It answers the pixel value of position to do and operation, 0 value area can be cropped, the background texture map with target shape is obtained, to realize The customizability of the fuzzy region of visual object.
Then, in step S630, background texture map is write back to the corresponding region of frame buffer zone.It is described herein " corresponding Region " is the visual object region in abovementioned steps S610.
Then, in step S640, visual object is drawn, to generate the prospect texture map of visual object.
In step S640, visual object is drawn, the pixel value of each pixel of visual object is obtained, it should by pixel value write-in In the off screen frame buffer zone (offscreen framebuffer) of visual object, the prospect texture map of the visual object is generated.
Then, in step S650, background texture map is subjected to Alpha with prospect texture map and is mixed, so as to render Visual object shows blur effect.
In step S650, visual object reads out background texture map from frame buffer zone, by background texture map and itself Off screen frame buffer zone in the prospect texture map that is stored carry out Alpha mixing, texture map obtained after mixing is write back into frame The corresponding region of buffer area.In this way, visual object will be in the desktop picture rendered according to the data in frame buffer zone Reveal blur effect.
Fig. 7, which is shown, carries out fuzzy schematic diagram to the window C in Fig. 3.As shown in fig. 7, frame buffer zone framebuffer In be stored with the RGBA channel value of each pixel of screen.
In step sl, the screen area 710 that window C (Actor_C) is covered is determined, by frame buffer zone The pixel value of each pixel copies to the fuzzy subobject (MetaBlurActor_ of window C in the region 710 of framebuffer C in off screen frame buffer zone (offscreen framebuffer)), the material of fuzzy subobject MetaBlurActor_C is generated Figure.Texture map includes Color Channel figure (i.e. R, G, channel B figure) and transparency channel figure (i.e. A channel figure).
Then, in step s 2, the texture map of fuzzy subobject MetaBlurActor_C is obscured and is cut.Tool Body:
Firstly, Fuzzy Processing is carried out to Color Channel figure, it is right respectively using preset convolution kernel (such as Gaussian convolution core) R, G, channel B figure in texture map do convolution, generate the fuzzy texture map including tri- channel figures of R, G, B.
Then, cutting processing is carried out to transparency channel figure, by the fuzzy region exposure mask (shape mask) and A of window C Channel figure is done and operation, i.e., does and operation the pixel value of the fuzzy region exposure mask of window C and the corresponding position of A channel figure, obtain A channel figure after to cutting, the A channel figure after cutting have shape defined in the fuzzy region exposure mask of window C.
By Fuzzy Processing and cut processing step, the background material of available fuzzy subobject MetaBlurActor_C Matter figure.Background texture map includes tri- channel figures of R, G, B (i.e. fuzzy texture map) after obscuring and the A channel figure after cutting.
Then, in step s3, background texture map is write back in the region 710 of frame buffer zone framebuffer.
Then, in step s 4, render window C, obtains the pixel value of each pixel in window C, and window is written in pixel value In the off screen frame buffer zone (offscreen framebuffer) of mouth C, the prospect texture map of window C is generated.
Then, in step s 5, window C (Actor_C) obtains background texture map from the region 710 in frame buffer zone, Prospect texture map is carried out Alpha with the background texture map got to mix.
Then, in step s 6, mixed texture map is write back the region 710 of frame buffer zone by window C (Actor_C) In.In this way, window C will show blur effect in the next frame desktop picture rendered based on frame buffer zone.
A kind of A11: calculating equipment, comprising:
At least one processor;With
It is stored with the memory of program instruction, described program instruction includes window manager;
When the window manager is read and executed by the processor, so that the calculating equipment is executed as right is wanted Seek rendering method described in any one of blur method and claim 8-10 of visual object described in any one of 1-7.
A12: a kind of readable storage medium storing program for executing being stored with program instruction is read and is held by calculating equipment when described program is instructed When row, so that the blur method and right for calculating equipment and executing such as visual object of any of claims 1-7 It is required that rendering method described in any one of 8-10.
Various technologies described herein are realized together in combination with hardware or software or their combination.To the present invention Method and apparatus or the process and apparatus of the present invention some aspects or part can take insertion tangible media, such as can Program code (instructing) in mobile hard disk, USB flash disk, floppy disk, CD-ROM or other any machine readable storage mediums Form, wherein when program is loaded into the machine of such as computer etc, and when being executed by the machine, the machine becomes to practice Equipment of the invention.
In the case where program code executes on programmable computers, calculates equipment and generally comprise processor, processor Readable storage medium (including volatile and non-volatile memory and or memory element), at least one input unit, and extremely A few output device.Wherein, memory is configured for storage program code;Processor is configured for according to the memory Instruction in the said program code of middle storage executes blur method and rendering method of the invention.
By way of example and not limitation, readable medium includes readable storage medium storing program for executing and communication media.Readable storage medium storing program for executing Store the information such as computer readable instructions, data structure, program module or other data.Communication media is generally such as to carry The modulated message signals such as wave or other transmission mechanisms embody computer readable instructions, data structure, program module or other Data, and including any information transmitting medium.Above any combination is also included within the scope of readable medium.
In the instructions provided here, algorithm and display not with any certain computer, virtual system or other Equipment is inherently related.Various general-purpose systems can also be used together with example of the invention.As described above, it constructs this kind of Structure required by system is obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can With using various programming languages realize summary of the invention described herein, and the description that language-specific is done above be for Disclosure preferred forms of the invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, knot is not been shown in detail Structure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, In Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims than feature more features expressly recited in each claim.More precisely, as following As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it abides by Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself As a separate embodiment of the present invention.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc. Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this It invents done disclosure to be illustrative and be not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. a kind of blur method of visual object executes in calculating equipment, the visual object has fuzzy subobject, described Method includes:
The pixel value that visual object region is obtained from frame buffer zone, generates the material of the fuzzy subobject of the visual object Figure;
Fuzzy Processing is carried out to the texture map, obtains background texture map;
The background texture map is write back to the corresponding region of the frame buffer zone;
The visual object is drawn, to generate the prospect texture map of the visual object;
The background texture map is carried out Alpha with the prospect texture map to mix, so that the visual object rendered shows Blur effect.
2. the method for claim 1, wherein the visual object includes:
Window, windows exchange component, window preview component, workspace preview component.
3. method according to claim 1 or 2, wherein it is described that Fuzzy Processing is carried out to the texture map, obtain background material The step of figure includes:
Fuzzy Processing is carried out to the texture map, obtains fuzzy texture map;
The fuzzy region exposure mask for obtaining the visual object mixes the fuzzy region exposure mask and the fuzzy texture map It closes, obtains the background texture map.
4. method as claimed in any one of claims 1-3, wherein the pixel value includes the color value and transparency of pixel Value, the texture map includes Color Channel figure and transparency channel figure;
Described to carry out Fuzzy Processing to the texture map, the step of obtaining background texture map, includes:
Fuzzy Processing is carried out to the Color Channel figure, obtains fuzzy texture map;
The fuzzy region exposure mask is mixed with the transparency channel figure, obtains background texture map.
5. method as claimed in claim 4, wherein it is described to the Color Channel figure carry out Fuzzy Processing the step of include: Convolution is carried out to the Color Channel figure using preset convolution kernel.
6. method as described in claim 4 or 5, wherein the fuzzy region exposure mask is the bitmap for being used to indicate fuzzy region, And the pixel value of fuzzy region is 1;
Described the step of being mixed the fuzzy region exposure mask with the transparency channel figure includes: by the fuzzy region The pixel value of the corresponding position of exposure mask and the transparency channel figure is done and operation.
7. being executed such as method of any of claims 1-6 by window manager.
8. a kind of rendering method executes in calculating equipment, comprising:
The visual object for redrawing request will be had sent and visual object with fuzzy subobject is as visual object to be redrawn;
Each visual object to be redrawn is rendered according to the display bottom-up sequence of level, wherein when to be redrawn visual right When as with fuzzy subobject, the visual object is obscured according to method of any of claims 1-7, so that Blur effect is presented in the visual object rendered.
9. method according to claim 8, wherein described to redraw the area information to be redrawn that request includes visual object.
10. method as claimed in claim 8 or 9, is executed by window manager.
CN201910683994.4A 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing equipment Active CN110457102B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910683994.4A CN110457102B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing equipment
CN202210614578.0A CN114924824B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910683994.4A CN110457102B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210614578.0A Division CN114924824B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing device

Publications (2)

Publication Number Publication Date
CN110457102A true CN110457102A (en) 2019-11-15
CN110457102B CN110457102B (en) 2022-07-08

Family

ID=68483598

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910683994.4A Active CN110457102B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing equipment
CN202210614578.0A Active CN114924824B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210614578.0A Active CN114924824B (en) 2019-07-26 2019-07-26 Visual object blurring method, visual object rendering method and computing device

Country Status (1)

Country Link
CN (2) CN110457102B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242838A (en) * 2020-01-09 2020-06-05 腾讯科技(深圳)有限公司 Blurred image rendering method and device, storage medium and electronic device
CN112199537A (en) * 2020-09-18 2021-01-08 杭州安恒信息技术股份有限公司 Visual image updating method and device, electronic device and storage medium
CN113791861A (en) * 2021-11-16 2021-12-14 北京鲸鲮信息系统技术有限公司 Window fuzzy transparent display method and device, electronic equipment and storage medium
CN114924824A (en) * 2019-07-26 2022-08-19 武汉深之度科技有限公司 Visual object blurring method, visual object rendering method and computing equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104103045A (en) * 2014-07-09 2014-10-15 广东欧珀移动通信有限公司 Gaussian blur processing method and system for terminal
CN105404438A (en) * 2014-08-13 2016-03-16 小米科技有限责任公司 Background fuzzy method and apparatus and terminal device
US20160148068A1 (en) * 2014-08-15 2016-05-26 Sony Corporation Image processing apparatus and method, and electronic device
CN106570847A (en) * 2016-10-24 2017-04-19 广州酷狗计算机科技有限公司 Image processing method and image processing device
CN106993134A (en) * 2017-03-31 2017-07-28 努比亚技术有限公司 A kind of video generation device and method, terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6348919B1 (en) * 1995-12-18 2002-02-19 3Dlabs Inc, Ltd. Graphics system with optimized use of unified local and frame buffers
US8495514B1 (en) * 2005-06-02 2013-07-23 Oracle America, Inc. Transparency assisted window focus and selection
US7970206B2 (en) * 2006-12-13 2011-06-28 Adobe Systems Incorporated Method and system for dynamic, luminance-based color contrasting in a region of interest in a graphic image
CN105453010B (en) * 2014-07-30 2019-06-11 华为技术有限公司 UI control background setting method, device and terminal
CN104156922A (en) * 2014-08-12 2014-11-19 广州市久邦数码科技有限公司 Image processing method and image processing system
CN105138317B (en) * 2015-07-24 2018-11-13 安一恒通(北京)科技有限公司 Window display processing method and device for terminal device
AU2016427777B2 (en) * 2016-10-31 2022-12-15 Victoria Link Limited A rendering process and system
CN110457102B (en) * 2019-07-26 2022-07-08 武汉深之度科技有限公司 Visual object blurring method, visual object rendering method and computing equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104103045A (en) * 2014-07-09 2014-10-15 广东欧珀移动通信有限公司 Gaussian blur processing method and system for terminal
CN105404438A (en) * 2014-08-13 2016-03-16 小米科技有限责任公司 Background fuzzy method and apparatus and terminal device
US20160148068A1 (en) * 2014-08-15 2016-05-26 Sony Corporation Image processing apparatus and method, and electronic device
CN106570847A (en) * 2016-10-24 2017-04-19 广州酷狗计算机科技有限公司 Image processing method and image processing device
CN106993134A (en) * 2017-03-31 2017-07-28 努比亚技术有限公司 A kind of video generation device and method, terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924824A (en) * 2019-07-26 2022-08-19 武汉深之度科技有限公司 Visual object blurring method, visual object rendering method and computing equipment
CN111242838A (en) * 2020-01-09 2020-06-05 腾讯科技(深圳)有限公司 Blurred image rendering method and device, storage medium and electronic device
CN112199537A (en) * 2020-09-18 2021-01-08 杭州安恒信息技术股份有限公司 Visual image updating method and device, electronic device and storage medium
CN113791861A (en) * 2021-11-16 2021-12-14 北京鲸鲮信息系统技术有限公司 Window fuzzy transparent display method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114924824B (en) 2023-11-14
CN114924824A (en) 2022-08-19
CN110457102B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN110457102A (en) Blur method, rendering method and the calculating equipment of visual object
US9373308B2 (en) Multi-viewport display of multi-resolution hierarchical image
EP3111318B1 (en) Cross-platform rendering engine
KR101086570B1 (en) Dynamic window anatomy
JP5893046B2 (en) Customizing the immersive environment
US5388201A (en) Method and apparatus for providing multiple bit depth windows
KR100989010B1 (en) Systems and methods for generating visual representations of graphical data and digital document processing
EP1462936A2 (en) Visual and scene graph interfaces
US20070245250A1 (en) Desktop window manager using an advanced user interface construction framework
EP2756481B1 (en) System and method for layering using tile-based renderers
EP2245598B1 (en) Multi-buffer support for off-screen surfaces in a graphics processing system
US9182938B2 (en) Method for controlling multiple displays and system thereof
US20110283227A1 (en) Displaying a user interface in a dedicated display area
JPH06301505A (en) Computer-controlled display system
JP6230076B2 (en) Virtual surface assignment
GB2574660A (en) Graphics rendering
CN116136784A (en) Data processing method, device, storage medium and program product
CN112686939B (en) Depth image rendering method, device, equipment and computer readable storage medium
CN112130948A (en) Display control method and device, computer readable medium and electronic device
CN111597001A (en) Application program display control method, device, medium and equipment
CN112001995B (en) Rendering apparatus, method, electronic device, and readable storage medium
EP2761396A1 (en) Displaying hardware accelerated video on x window systems
US20220334707A1 (en) Computer-implemented method and SDK for rapid rendering of object-oriented environments with enhanced interaction
US9811945B2 (en) On-demand transformation aware shape tessellation
Hoddie et al. Drawing Graphics with Poco

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant