You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comment 8. originally posted by magreenblatt on 2012-09-05T14:45:40.000Z:
CEF1's off-screen rendering API currently supports the following methods:
Methods that the client implements:
GetScreenRect: Called to return the screen bounds. Used for constraining popup widget size and placement.
GetViewRect: Called to return the position of the view relative to the screen bounds.
OnPopupShow: Called when the browser wants to show or hide the popup widget.
OnPopupSize: Called when the browser wants to move or resize the popup widget.
OnPaint: Called to paint the view or popup widget. Provides dirty rectangles and a pixel buffer.
OnCursorChange: Called when the cursor changes.
Methods that the browser provides:
GetSize: Returns the size of the view or popup widget.
SetSize: Sets the size of the view or popup widget.
Invalidate: Force repaint and call OnPaint() for the specified region.
SendKeyEvent: Notify the view of keyboard events.
SendMouseClickEvent: Notify the view of mouse click events.
SendMouseMoveEvent: Notify the view of mouse move events.
SendMouseWheelEvent: Notify the view of mouse wheel events.
SendFocusEvent: Set or remove focus from the view.
To implement off-screen rendering with CEF3 and the Content API we will need to provide our own WebContentsView and RenderWidgetHostView implementations via ContentBrowserClient::OverrideCreateWebContentsView(). These interfaces currently have methods that return platform-defined handle types (gfx::NativeView and gfx::NativeWindow). We don't want to change the definitions of these types in native_widget_types.h because CEF supports both off-screen rendering and "default" native windows in the same binary. Consequently, we can (a) always return NULL from these methods and provide my own implementation methods to return identifiers, or (b) cast identifiers to/from the platform type. It seems like (a) would be a safer option. There should be no code outside of the WebContentsView and RenderWidgetHostView implementation that requires the return of a valid platform handle, but we will need to audit the code to make sure.
Comment 9. originally posted by [email protected] on 2012-09-05T15:59:36.000Z:
Its fantastic to see that some work is being done to support this feature. Its truly an important feature. It will also be great to find out if it will be possible to support accelerated content in off-screen. - that would be awesome.
Comment 12. originally posted by cosmo.shih on 2012-09-25T09:51:32.000Z:
In most case, off-screen rending is required, because users want to get raw content data and render contents by some specific technology, not just render into a native window.
Unfortunate, GPU accelrating is highly platform-dependent(not just OS, but software enviroment), and there is leaking a generic inter-process GPU resource sharing mechanism, so off-screen rending can't utilizing GPU effectively.
Because Chromium GPU process just paints content into screen directly which rely on Direct3D internal Device <-> SwapChain <-> HWND mapping. There is no way to get the content from Vedio-Card effectively from another process as I know.
Just rending with GPU, then transfer contents from VRAM to RAM for inter-process communication doesn't make sense, cause VRAM to RAM transfer horribly slow.
Comment 13. originally posted by efrencd on 2012-09-25T15:42:35.000Z:
First of all excuse my ignorance in this topic, I'm not a c++ programmer.
I got two questions:
Even moving things from VRAM to RAM is very costly... Isn't it even slower to let the software renderer try to process things such as WebGL? What is the expected framerete we could get at for example full HD resolution coping form VRAM to RAM in a fast machine?
Things such as Nvia GPU Direct feature on some of their cards wouldn't be helpfull on that case?
Comment 14. originally posted by magreenblatt on 2012-09-25T15:52:42.000Z:
@ comment comment 12.-13: We can potentially composite to a system memory buffer (bitmap) and share it with the browser process instead of having the GPU process write directly to the display. This will result in increased CPU usage but we should be able to maintain a reasonable frame rate (>=24fps). Using software rendering for WebGL isn't a viable option.
Off-screen rendering is meant to be used for those who need an array of bytes containing the webview. If you want to enable hardware acceleration, the web content will go to an accelerated surface and you should copy from that surface back to your buffer. This is going to be very expensive.
Can you describe the use case, why do you need OSR & hardware acceleration, why a non OSR, hardware accelerated browser instance wouldn't be an option.
Yes, it is best not to read the data bytes back from GPU for the performance concern.
In my use case, I am not really trying to render the web contents to window, what really concerns is the data bytes, no matter where they are.
If they are placed on the GPU, I would make use of these data in the GPU way, anyway. As I said, there will be a shared resource in hardware-rendering path. I think it would be fine to make use of this resource.
Original comment by Dmitry Azaraev (Bitbucket: Mystic Artifact).
Comment 122. originally posted by fddima on 2013-06-21T08:14:09.000Z:
@ commentcomment 12.0: without hardware acceleration no any css 3d transforms works. So if we will see from rendering correctness point - we must no have concern about performance penalties, 'cause fast code which work incorrectly - incorrect code. ;)
also it is not bad idea have capabilities to rendering in specific surface (directx) - in this case it is can be more easy to embedd it in directx-based applications.
@ commentcomment 12.2
It would be really nice to have the capability to render into a specific surface, but this sounds to a feature besides OSR.
I wouldn't say that non-accelerated rendering works incorrectly, it's more like it has limited capabilities and it works as intended. If you'd like to have an off-screen buffer for each frame, you'd probably not be able to replay a smooth animations from them. If you want an off-screen buffer with a webview snapshot, there should be options to do this without off-screen rendering.
Original comment by Dmitry Azaraev (Bitbucket: Mystic Artifact).
Comment 125. originally posted by fddima on 2013-06-21T12:14:10.000Z:
@ commentcomment 12.4: Sorry, may be my previous message may be not completely understandable. Incorrectness of OSR are not in technical details / implementation - it incorrect from default user expectation (i.e. users are waiting same behavior as windowed mode). There is not first GPU & OSR discussion, and most of them we always speak about lack of performance, but i just point, that also other point of view on same problem exists -> it is get worked available already implemented features without concern of performance. Of course more performant solution is better. :)
Comment 126. originally posted by magreenblatt on 2013-06-21T19:24:08.000Z:
The attached patch against trunk revision 1280 adds off-screen rendering support on Linux. I've only tested it on Ubuntu 12.04 64-bit so far. The cefclient OSR example adds a new dependency on the libgtkglext1-dev package.
It would be great if someone with linux/GTK experience could review this patch. I plan to commit it some time next week (trunk and 1453 branch).
Any ideas why CEF3 with offscreen rendering doesn't render flash (e.g. youtube videos)? My guess is it needs the same windowless-flash patch as in CEF1
Comment 130. originally posted by magreenblatt on 2013-06-27T17:53:31.000Z:
Linux off-screen rendering support added in trunk revision 1294 and 1453 branch revision 1295.
This issue is now closed:
* File new bugs or feature requests as a separate issue (search first to make sure it doesn't already exist).
* Use the CEF Forum for questions related to off-screen rendering.
* Support for hardware acceleration will be discussed in issue comment 10.06.
Activity
magreenblatt commentedon Apr 28, 2012
Original comment by Anonymous.
Comment 2. originally posted by [email protected] on 2012-04-28T14:07:04.000Z:
I wonder, is the off-screen rendering transparent color problem handled in CEF3? issue #584
magreenblatt commentedon May 7, 2012
Original comment by Anonymous.
Comment 3. originally posted by 3eR0.1ive on 2012-05-07T23:54:35.000Z:
very important and useful feature!
magreenblatt commentedon Jun 8, 2012
Comment 4. originally posted by magreenblatt on 2012-06-08T14:26:30.000Z:
This thread provides information on how to make transparency work with accelerated compositing: http://groups.google.com/a/chromium.org/group/chromium-dev/browse\_thread/thread/c3434035982c6a42
magreenblatt commentedon Jul 21, 2012
Original comment by Anonymous.
Comment 5. originally posted by Feabauer on 2012-07-21T06:00:32.000Z:
I'm waiting this feature, performance of cef1 is not so ideal
magreenblatt commentedon Aug 7, 2012
Original comment by Anonymous.
Comment 6. originally posted by [email protected] on 2012-08-07T08:59:45.000Z:
Very useful functionnality
magreenblatt commentedon Aug 24, 2012
Original comment by Anonymous.
Comment 7. originally posted by arroy.one on 2012-08-24T16:54:40.000Z:
killer feature! What platforms will be supported?
magreenblatt commentedon Sep 5, 2012
Comment 8. originally posted by magreenblatt on 2012-09-05T14:45:40.000Z:
CEF1's off-screen rendering API currently supports the following methods:
Methods that the client implements:
Methods that the browser provides:
To implement off-screen rendering with CEF3 and the Content API we will need to provide our own WebContentsView and RenderWidgetHostView implementations via ContentBrowserClient::OverrideCreateWebContentsView(). These interfaces currently have methods that return platform-defined handle types (gfx::NativeView and gfx::NativeWindow). We don't want to change the definitions of these types in native_widget_types.h because CEF supports both off-screen rendering and "default" native windows in the same binary. Consequently, we can (a) always return NULL from these methods and provide my own implementation methods to return identifiers, or (b) cast identifiers to/from the platform type. It seems like (a) would be a safer option. There should be no code outside of the WebContentsView and RenderWidgetHostView implementation that requires the return of a valid platform handle, but we will need to audit the code to make sure.
We will also need to determine if it's possible to support accelerated content in off-screen rendering. Chromium currently uses a separate process to manage the GPU pipeline. Implementation details are available at http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome.
magreenblatt commentedon Sep 5, 2012
Original comment by Anonymous.
Comment 9. originally posted by [email protected] on 2012-09-05T15:59:36.000Z:
Its fantastic to see that some work is being done to support this feature. Its truly an important feature. It will also be great to find out if it will be possible to support accelerated content in off-screen. - that would be awesome.
@ Marshall : Thanks or your great work !!
magreenblatt commentedon Sep 18, 2012
Original comment by Anonymous.
Comment 10. originally posted by askthegimp on 2012-09-18T07:39:13.000Z:
One more vote for this feature! Great stuff.
magreenblatt commentedon Sep 22, 2012
Original comment by Anonymous.
Comment 11. originally posted by jochen.heckl on 2012-09-22T14:56:26.000Z:
+1 for bringing this feature in soon
magreenblatt commentedon Sep 25, 2012
Original comment by Anonymous.
Comment 12. originally posted by cosmo.shih on 2012-09-25T09:51:32.000Z:
In most case, off-screen rending is required, because users want to get raw content data and render contents by some specific technology, not just render into a native window.
Unfortunate, GPU accelrating is highly platform-dependent(not just OS, but software enviroment), and there is leaking a generic inter-process GPU resource sharing mechanism, so off-screen rending can't utilizing GPU effectively.
Because Chromium GPU process just paints content into screen directly which rely on Direct3D internal Device <-> SwapChain <-> HWND mapping. There is no way to get the content from Vedio-Card effectively from another process as I know.
Just rending with GPU, then transfer contents from VRAM to RAM for inter-process communication doesn't make sense, cause VRAM to RAM transfer horribly slow.
magreenblatt commentedon Sep 25, 2012
Original comment by Anonymous.
Comment 13. originally posted by efrencd on 2012-09-25T15:42:35.000Z:
First of all excuse my ignorance in this topic, I'm not a c++ programmer.
I got two questions:
Even moving things from VRAM to RAM is very costly... Isn't it even slower to let the software renderer try to process things such as WebGL? What is the expected framerete we could get at for example full HD resolution coping form VRAM to RAM in a fast machine?
Things such as Nvia GPU Direct feature on some of their cards wouldn't be helpfull on that case?
http://developer.nvidia.com/cuda/nvidia-gpudirect
magreenblatt commentedon Sep 25, 2012
Comment 14. originally posted by magreenblatt on 2012-09-25T15:52:42.000Z:
@ comment comment 12.-13: We can potentially composite to a system memory buffer (bitmap) and share it with the browser process instead of having the GPU process write directly to the display. This will result in increased CPU usage but we should be able to maintain a reasonable frame rate (>=24fps). Using software rendering for WebGL isn't a viable option.
magreenblatt commentedon Sep 26, 2012
Original comment by Anonymous.
Comment 15. originally posted by cosmo.shih on 2012-09-26T01:43:41.000Z:
@ comment comment 13.:
@ comment comment 14.:
Software rendering seem like the only chose for off-screen render. so GPU-intense function isn't practical in near future.
121 remaining items
magreenblatt commentedon Jun 21, 2013
Original comment by Anonymous.
Comment 120. originally posted by [email protected] on 2013-06-21T07:08:55.000Z:
Off-screen rendering is meant to be used for those who need an array of bytes containing the webview. If you want to enable hardware acceleration, the web content will go to an accelerated surface and you should copy from that surface back to your buffer. This is going to be very expensive.
Can you describe the use case, why do you need OSR & hardware acceleration, why a non OSR, hardware accelerated browser instance wouldn't be an option.
magreenblatt commentedon Jun 21, 2013
Original comment by Anonymous.
Comment 121. originally posted by [email protected] on 2013-06-21T08:02:17.000Z:
Yes, it is best not to read the data bytes back from GPU for the performance concern.
In my use case, I am not really trying to render the web contents to window, what really concerns is the data bytes, no matter where they are.
If they are placed on the GPU, I would make use of these data in the GPU way, anyway. As I said, there will be a shared resource in hardware-rendering path. I think it would be fine to make use of this resource.
magreenblatt commentedon Jun 21, 2013
Original comment by Dmitry Azaraev (Bitbucket: Mystic Artifact).
Comment 122. originally posted by fddima on 2013-06-21T08:14:09.000Z:
@ commentcomment 12.0: without hardware acceleration no any css 3d transforms works. So if we will see from rendering correctness point - we must no have concern about performance penalties, 'cause fast code which work incorrectly - incorrect code. ;)
also it is not bad idea have capabilities to rendering in specific surface (directx) - in this case it is can be more easy to embedd it in directx-based applications.
magreenblatt commentedon Jun 21, 2013
Original comment by Anonymous.
Comment 124. originally posted by [email protected] on 2013-06-21T08:46:14.000Z:
@ commentcomment 12.2
It would be really nice to have the capability to render into a specific surface, but this sounds to a feature besides OSR.
I wouldn't say that non-accelerated rendering works incorrectly, it's more like it has limited capabilities and it works as intended. If you'd like to have an off-screen buffer for each frame, you'd probably not be able to replay a smooth animations from them. If you want an off-screen buffer with a webview snapshot, there should be options to do this without off-screen rendering.
magreenblatt commentedon Jun 21, 2013
Original comment by Dmitry Azaraev (Bitbucket: Mystic Artifact).
Comment 125. originally posted by fddima on 2013-06-21T12:14:10.000Z:
@ commentcomment 12.4: Sorry, may be my previous message may be not completely understandable. Incorrectness of OSR are not in technical details / implementation - it incorrect from default user expectation (i.e. users are waiting same behavior as windowed mode). There is not first GPU & OSR discussion, and most of them we always speak about lack of performance, but i just point, that also other point of view on same problem exists -> it is get worked available already implemented features without concern of performance. Of course more performant solution is better. :)
magreenblatt commentedon Jun 21, 2013
Comment 126. originally posted by magreenblatt on 2013-06-21T19:24:08.000Z:
The attached patch against trunk revision 1280 adds off-screen rendering support on Linux. I've only tested it on Ubuntu 12.04 64-bit so far. The cefclient OSR example adds a new dependency on the libgtkglext1-dev package.
It would be great if someone with linux/GTK experience could review this patch. I plan to commit it some time next week (trunk and 1453 branch).
magreenblatt commentedon Jun 21, 2013
magreenblatt commentedon Jun 22, 2013
Original comment by Anonymous.
Comment 127. originally posted by [email protected] on 2013-06-22T10:46:44.000Z:
Any ideas why CEF3 with offscreen rendering doesn't render flash (e.g. youtube videos)? My guess is it needs the same windowless-flash patch as in CEF1
magreenblatt commentedon Jun 24, 2013
Comment 128. originally posted by magreenblatt on 2013-06-24T16:51:19.000Z:
Trunk revision 1285 and 1453 branch revision 1286 force flash and silverlight plugins to windowless mode when using off-screen rendering.
magreenblatt commentedon Jun 27, 2013
Comment 129. originally posted by magreenblatt on 2013-06-27T17:37:05.000Z:
issue #594 has been merged into this issue.
magreenblatt commentedon Jun 27, 2013
Comment 130. originally posted by magreenblatt on 2013-06-27T17:53:31.000Z:
Linux off-screen rendering support added in trunk revision 1294 and 1453 branch revision 1295.
This issue is now closed:
* File new bugs or feature requests as a separate issue (search first to make sure it doesn't already exist).
* Use the CEF Forum for questions related to off-screen rendering.
* Support for hardware acceleration will be discussed in issue comment 10.06.
magreenblatt commentedon Jun 27, 2013
Merge revision 1226 changes:
Merge revision 1285 changes:
Merge revision 1294 changes: