Adding easy-to-use screenshotting functionality to offscreen renderer

Merged
#52 · Created  · Last updated

Merged pull request

Add ability to take OSR screenshots and fix OSR scaling (fixes issue #92, see issue #343).

ae4bd6a·Author: ·Closed by: ·2020-08-31

Description

This introduces a method to CefBrowser which is supposed to return a screenshot of the currently displayed browser window in the convenient form of a BufferedImage. CefBrowserOsr (offscreen rendering) implements this functionality by directly grabbing pixel data from the OpenGL rendering path. CefBrowserWr (windowed rendering) does not implement it because there is no clear way to access pixel data in case of windowed rendering.

There is even an issue requesting such a feature (issue #92), but I only found that just now when cleaning up the code and getting this pull request ready for submission. I developed the feature a while ago due to our own demand, and the code has been in daily use for several months already, mostly to grab screenshots during automated test execution.

0 attachments

0 comments

Loading commits...