Jump to content

  • Log In with Google      Sign In   
  • Create Account


out of process texture?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 jeff8j   Members   -  Reputation: 713

Like
0Likes
Like

Posted 23 October 2012 - 01:33 PM

I am running a web browser that is rendering to a texture and would like to make it out of process I havent yet started so I cannot say how performance would be but im looking for thoughts on how to do it the best way. In my mind the only way I can do this is horribly inefficient
1. browser renders in its process
2. data is copied and sent to the main process
3. main process binds texture and renders

That seems like quite a bit of memory copying is that the only way to do this or is there a way the browser process can send directly to the gpu?

I guess another option would be some kind of shared memory between processes that way a copy doesnt have to be made but I would like to know what you all think. Thanks

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 12979

Like
0Likes
Like

Posted 23 October 2012 - 02:26 PM

There might be a better solution if we had context on the problem.
What is the browser drawing?
Why does the browser need to draw it?
Why does it need to then be drawn again in another process?
How frequently does this transfer of images occur?


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 jeff8j   Members   -  Reputation: 713

Like
0Likes
Like

Posted 23 October 2012 - 03:03 PM

Right now its the awesomium web browser library but im considering going to something else like berkelium
Its a web browser so it renders the html of the websites
Maybe draw is not the right word it has to render a 2d image of it then send it to opengl which is in the parent process to be drawn to the screen
It doesnt have to be out of process but would be nice to handle crashes and lockups
From a little bit of testing its all over the map on transfers something like google.com is twice or so per second but things with flash gifs movies will update as many time as I ask

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


#4 L. Spiro   Crossbones+   -  Reputation: 12979

Like
0Likes
Like

Posted 23 October 2012 - 05:08 PM

It’s a library, not an external process. It is meant to be integrated into your application, to result in still one application.
Is there any reason you can’t do this?
It seems to me that if you are planning to have these as separate applications, it means you do have control over the library (or else how would you make it work so that it could send the results remotely?) and thus have the ability to instead just make them one application. Furthermore, it’s just not possible that they meant for their library to be used that way. They would never have any form of commercial success or be able to market it to any serious person/company/entity.
Are you really really sure you can’t just make it all one application?


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#5 jeff8j   Members   -  Reputation: 713

Like
0Likes
Like

Posted 23 October 2012 - 05:13 PM

I have it as one application as it is I want it as a separate process to handle crashes which isnt a problem im just trying to think of the best way to minimise the overhead and not make three copies of the same data for each update thats alot of memory bandwidth.

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/


#6 L. Spiro   Crossbones+   -  Reputation: 12979

Like
0Likes
Like

Posted 23 October 2012 - 05:23 PM

If you are worried about their library crashing, that can obviously only happen when you actually call their functions, and the easy/safe route is to simply wrap those calls behind some wrappers which internally call the library functions inside try/catch blocks.
If the library crashes your overall application walks away fine.

If you are worried about your main application crashing rather than the library crashing, that wouldn’t help you to keep them as separate processes. The library application is a slave to the main application. If the main crashes it’s over. You have to restart it.
Then there is the obvious fact that it is your code, so instead of hacking together 2 different applications, better advice would be to simply fix your code so that it doesn’t crash.


I am going to assume you are more worried about the library crashing, and exception handlers will put a quick end to that.
Last chance to repent. Is there any reason why you would rather go the slow, difficult, and hacky route of having 2 processes instead of 1 easy-to-make and better-performing process with exception handling?


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#7 jeff8j   Members   -  Reputation: 713

Like
0Likes
Like

Posted 24 October 2012 - 08:13 AM

Well I thought about it and slept on it and I think your right about it as long as the try catch can catch everything that way there doesnt have to be out of process communication. I will have to put together some tests that intentionally kill/lock up the external libraries I plan on using and hopefully everything can be handled that way. I was just thinking like chrome where all tabs are a different process and each page can die individually. I am still worried about lock ups because then it will never return and never be thrown to catch so it may lock up the whole program so ill have to figure out how that is handled. Thanks

Firefox youtube video and audio downloader MP3 MP4 OGG WEBM

https://addons.mozilla.org/en-US/firefox/addon/simple-youtube-converter/





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS