Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Off-screen rendering (OSR) support #2

Open
cztomczak opened this issue Feb 7, 2014 · 8 comments
Open

Off-screen rendering (OSR) support #2

cztomczak opened this issue Feb 7, 2014 · 8 comments

Comments

@cztomczak
Copy link
Owner

Many people are asking for this, so it should become a high priority.

What should the example do? What libraries to use in the example? Some framework/game engine or just plain win32 WM_PAINT?

@h12w
Copy link

h12w commented Feb 16, 2014

I suggest rendering the page on a SDL2 surface. SDL2 is portable on all major platforms including iOS and Android. (I have made a Go binding package: https://github.com/hailiang/go-sdl ).

@cztomczak
Copy link
Owner Author

Currently there is a bug in Go linker on Windows that prevents us from implementing app/client handlers, thus OSR cannot be implemented (at least on Windows). The plan was to create OSR example for Windows first (that's my main platform). See the code comments about the problem in the _InitializeGlobalCStructures() function.

There is Issue 2601 in the Go project that I think might be the cause of the problem.

@cztomczak
Copy link
Owner Author

It turns out this is some problem with GCC on Windows when calling Chromium C API, as I've prepared a C example that does same things as in Go and these exceptions also occur. Reported problem on the CEF forum:

http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11505

@cztomczak
Copy link
Owner Author

App/Client handlers Windows issue was fixed in commit f789834. Nothing stands in way to implement OSR now.

@h12w
Copy link

h12w commented Feb 18, 2014

That's great news!

@cztomczak
Copy link
Owner Author

Off-screen rendering support was implemented in paperlesspost fork (https://github.com/paperlesspost/cef2go). See cef/render_handler.go . This fork is tested on Linux only.

For an example usage of OnPaint callback see this commit:
https://github.com/paperlesspost/cef2go/blob/ada33ec9eaa634634eca89da69d1a48bccc22282/cef/cef_callbacks.go

@oldtree2008
Copy link

I use cef2go to develop a gis app. I use html5 webgl draw map. when I drag data file to the map. but Map dont't refresh. But I use cef c# wrapper, It can work. Chrome also can work.why?

I guess my problem may have something to do with the WM_PAINT event.

I am not sure.

@cztomczak
Copy link
Owner Author

@oldtree2008 Please do not ask questions in the tracker. Do not talk off-topic. Use forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants