The above advantages and features of the present invention will be more apparent from the following detailed description taken in conjunction with the drawings in which:
Now, one embodiment of the present invention will be elaborated with reference to the figures, throughout which the same reference symbols, though shown in different figures, represent the same or similar components. For the purpose of clarity and conciseness, the detailed description of known functions and structures incorporated here will be omitted. Otherwise, they may obscure the subject of the present invention.
As shown in
As shown in
If the currently-displayed image is a full-screen hardware-accelerated image, the data of the hardware-accelerated image is acquired in a realtime manner from a full-screen hardware-acceleration program 70 by intercepting the invocation of the graphics/image hardware-acceleration interface by the hardware-accelerated image-acquisition module 10.
If the currently-displayed image is a non-hardware-accelerated image, using the screen-mirroring technique for the update region, the non-hardware-accelerated image-acquisition module 20 acquires all updates of the non-hardware-accelerated image to be added to the update-region list by the application (GDI) 60. The updates are added into the specified update-region list 55, and only coordinates of the update regions are disposed in the update-region list 55.
If the currently-displayed image is a hardware-accelerated image rendered in the frame buffer 50 by the hardware-acceleration program for rendering in the frame buffer 90, the non-hardware-accelerated image-acquisition module 20 creates an update region having the same size as the hardware-accelerated image rendered in the frame buffer and adds the update region to the update-region list 55.
If the currently-displayed image is a hardware-accelerated image with Overlay, the non-hardware-accelerated image-acquisition module 20 utilizes the Overlay program 80, i.e., Overlay update-invoking interface, to acquire the current information about Overlay on the screen, such as display location, window size and display mode, then fills a corresponding region in the frame buffer 50 with KeyColor (some color value to which the human eye is insensitive, for example, a color close to black, and that the Overlay image color to be displayed can penetrate) and creates an update region of corresponding size to be added to the update-region list 55. Meanwhile, the hardware-accelerated image-acquisition module 10 acquires the data of the hardware-accelerated image in a real time fashion through the hardware-acceleration-invoking interface.
Next, the update-region combination-and-acquisition module 30 combines the update regions in the update-region list and picks up the data of the combined-screen region from the frame buffer so as to obtain all the data of the non-hardware-accelerated image.
Finally, the overlay module 40 overlays the obtained hardware-accelerated and non-hardware-accelerated images together for display on the screen.
Now, a detailed explanation will be given to the process of one embodiment of an inventive method for acquiring a screen image in Overlay mode.
For the scenario in which hardware-accelerated and non-hardware-accelerated images are displayed simultaneously on the computer screen, for example, a video window of size (480*320) is embedded at the upper left corner (0,0) of an Internet webpage of size (1024*768), the video window is displayed in Overlay mode.
First, the non-hardware-accelerated image-acquisition module 20 is loaded to acquire all updates in the webpage, with the updates being one or more rectangular regions, and to add the updates (one or more rectangular regions) to the update-region list 55. As mentioned previously, only the locations and sizes of the one or more updated rectangular regions are shown in the update-region list 55.
Then, the hardware-accelerated image-acquisition module 10 is loaded to intercept the invocation of the graphics/image hardware-acceleration interface by the video window, duplicate the data of the video image, acquire the display location of the Overlay image layer for the video window (in one embodiment, the coordinates of the rectangular region may be (0,0,480,320)) with the KeyColor capable of being displayed transparently, such as RGB (16,0,16), and to fill the corresponding region defined by, for example, (0,0,480,320) in the webpage with the color of KeyColor. In one embodiment, a rectangle of size defined by (0,0,480,320) is created upon the completion of the filling and added to the update-region list 55.
Next, the update-region combination and acquisition module 30 combines the update regions in the update-region list and picks up the combined webpage region from the frame buffer 50.
In the end, the overlay module 40 overlays directly the data of both the duplicated video image and the picked-up webpage image to obtain the final result, namely the webpage with the video window displayed at the upper left corner.
Although the above description is intended to implement several embodiments of the present invention, those skilled in the art will appreciate that any modification and partial substitution within the scope of the invention should belong to the scope of the present invention as defined in the appended claims. Therefore, the scope of the present invention should be defined by the claims.
Number | Date | Country | Kind |
---|---|---|---|
200610113404.7 | Sep 2006 | CN | national |