Is offscreen rendering needed?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Is offscreen rendering needed?

Postby itsthetaste » Sat Jul 13, 2013 9:59 pm

I've been making a an AIr Native Extension for 5 weeks now and am nearly ready to integrate it into my actual project. One of the issue I had to overcome was that the framerate of the flash plugin was really slow. I put this down to the fact that I didn't have a visible window and overcame this by finding the adobe air window and using that as the parent for my window that I was going to hide off screen within it. This is work well, but in doing so, I realised that I was actualy creating the window inside Adobe AIR, so why not try switching it back to a normal child window and see if it displays and voila it does. This allows me to support PDF's now as the window is no longer offscreen.

This discovery is both good and bad, good because it will be less code run a little faster and I've learnt loads doing this exercise, but bad because I've already written loads that I'm thinking I can just chuck away now. So, I'm left wondering what the purpose of the offscreen rendering is as surely every implementation must have a window of some sort that they can use? I'm asking from the point of view that I came to this project with no C++ or Win32 API experience and think it might be useful for others to understand too.

Thanks
Richard
itsthetaste
Techie
 
Posts: 35
Joined: Mon Jun 10, 2013 8:03 pm

Re: Is offscreen rendering needed?

Postby Czarek » Sun Jul 14, 2013 1:57 am

Hi Richard,

Take a look at this example of embedding a browser window in a game:

https://www.youtube.com/watch?v=tV7ei1Z40fQ

Off-screen rendering is useful when you don't use native GUI controls, for example when you render
windows using DirectX / OpenGL, so the only way to embed a browser in your application is to draw
it yourself, so you need a buffer of pixels to draw.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Is offscreen rendering needed?

Postby itsthetaste » Tue Jul 16, 2013 6:20 pm

Hey, thanks for the explanation and cool demo :)
itsthetaste
Techie
 
Posts: 35
Joined: Mon Jun 10, 2013 8:03 pm

Re: Is offscreen rendering needed?

Postby ramezrafla » Fri Sep 18, 2015 12:36 pm

Hello itsthetaste,
Is your Adobe Native Extension working well? We are interested in making our own as well (or sharing in the costs of development).
ramezrafla
Newbie
 
Posts: 1
Joined: Fri Sep 18, 2015 12:34 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 45 guests