Re: A different way to handle pulse timing

2013-08-06 Thread David Hill
On 8/6/13 Aug 6, 10:07 AM, Scott Palmer wrote: On 2013-08-06, at 9:10 AM, Artem Ananiev wrote: On 8/5/2013 10:26 PM, Richard Bair wrote: In this proposal, we also would be putting the next pulse on the end of the queue, so it is impossible to starve input events. Putting the next pulse on t

Re: A different way to handle pulse timing

2013-08-06 Thread Artem Ananiev
On 8/6/2013 6:07 PM, Scott Palmer wrote: On 2013-08-06, at 9:10 AM, Artem Ananiev wrote: On 8/5/2013 10:26 PM, Richard Bair wrote: In this proposal, we also would be putting the next pulse on the end of the queue, so it is impossible to starve input events. Putting the next pulse on the

Re: A different way to handle pulse timing

2013-08-06 Thread Scott Palmer
On 2013-08-06, at 9:10 AM, Artem Ananiev wrote: > > On 8/5/2013 10:26 PM, Richard Bair wrote: >> >> In this proposal, we also would be putting the next pulse on the end >> of the queue, so it is impossible to starve input events. > > Putting the next pulse on the end of the queue is surprisi

Re: A different way to handle pulse timing

2013-08-06 Thread Artem Ananiev
On 8/5/2013 9:09 PM, Richard Bair wrote: In the past we have seen situations where there are so many tasks on the user event thread, that user response (even on desktop) was not acceptable. Some of these items are getting better as we improve design (ie less redundant layout operations causes by

Re: A different way to handle pulse timing

2013-08-06 Thread Artem Ananiev
On 8/5/2013 10:26 PM, Richard Bair wrote: In the past we have seen situations where there are so many tasks on the user event thread, that user response (even on desktop) was not acceptable. Some of these items are getting better as we improve design (ie less redundant layout operations causes b

Re: A different way to handle pulse timing

2013-08-05 Thread John Hendrikx
On 5/08/2013 20:46, Richard Bair wrote: As I wrote in the previous email, it seems that we currently are not blocked waiting for vsync(), at least on Windows with D3D pipeline. Anyway, even if we "fix" that, what you propose is that sometimes both threads will be blocked (the render thread wai

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
>> As I wrote in the previous email, it seems that we currently are not blocked >> waiting for vsync(), at least on Windows with D3D pipeline. Anyway, even if >> we "fix" that, what you propose is that sometimes both threads will be >> blocked (the render thread waiting for vsync, the event thre

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
> I now see the picture. > > As I wrote in the previous email, it seems that we currently are not blocked > waiting for vsync(), at least on Windows with D3D pipeline. Anyway, even if > we "fix" that, what you propose is that sometimes both threads will be > blocked (the render thread waiting f

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
> Right, I guess I don't have a complete picture of the threading model. > > I assume that user events like mouse clicks and key presses are coming in > from some OS thread and queued on the "user event thread". Meanwhile things > like runLater() are also queued on the user event thread. If oth

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
>>> In the past we have seen situations where there are so many tasks on the >>> user event thread, that user response (even on desktop) was not acceptable. >>> Some of these items are getting better as we improve design (ie less >>> redundant layout operations causes by a single change/event).

Re: A different way to handle pulse timing

2013-08-05 Thread David Hill
On 8/5/13 Aug 5, 1:40 PM, Scott Palmer wrote: On 2013-08-05, at 12:49 PM, David Hill wrote: On 8/5/13 Aug 5, 12:27 PM, Scott Palmer wrote: The idea of user event starvation has been mentioned before and has me a little confused… Why aren't things handled as a simple queue, with no prioritie

Re: A different way to handle pulse timing

2013-08-05 Thread David Hill
On 8/5/13 Aug 5, 1:09 PM, Richard Bair wrote: In the past we have seen situations where there are so many tasks on the user event thread, that user response (even on desktop) was not acceptable. Some of these items are getting better as we improve design (ie less redundant layout operations ca

Re: A different way to handle pulse timing

2013-08-05 Thread Scott Palmer
On 2013-08-05, at 12:49 PM, David Hill wrote: > On 8/5/13 Aug 5, 12:27 PM, Scott Palmer wrote: >> The idea of user event starvation has been mentioned before and has me a >> little confused… Why aren't things handled as a simple queue, with no >> priorities or anything, so starvation is impos

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
> In the past we have seen situations where there are so many tasks on the user > event thread, that user response (even on desktop) was not acceptable. Some > of these items are getting better as we improve design (ie less redundant > layout operations causes by a single change/event). Right,

Re: A different way to handle pulse timing

2013-08-05 Thread David Hill
On 8/5/13 Aug 5, 12:27 PM, Scott Palmer wrote: The idea of user event starvation has been mentioned before and has me a little confused… Why aren't things handled as a simple queue, with no priorities or anything, so starvation is impossible? Is this something the OS is doing? There is a "s

Re: A different way to handle pulse timing

2013-08-05 Thread Richard Bair
> The idea of user event starvation has been mentioned before and has me a > little confused… Why aren't things handled as a simple queue, with no > priorities or anything, so starvation is impossible? Is this something the > OS is doing? That's what I'm wondering too. > In terms of renderin

Re: A different way to handle pulse timing

2013-08-05 Thread Scott Palmer
The idea of user event starvation has been mentioned before and has me a little confused… Why aren't things handled as a simple queue, with no priorities or anything, so starvation is impossible? Is this something the OS is doing? In terms of rendering fast enough that you can fit things into

Re: A different way to handle pulse timing

2013-08-05 Thread David Hill
On 8/1/13 Aug 1, 3:52 PM, Richard Bair wrote: as far as I can read it, your idea is to start preparing the next frame right after synchronization (scenegraph to render tree) is completed for the previous frame. Do I get it correctly? If yes, we'll likely re-introduce the old problem with input

Re: A different way to handle pulse timing

2013-08-02 Thread Artem Ananiev
On 8/1/2013 11:52 PM, Richard Bair wrote: as far as I can read it, your idea is to start preparing the next frame right after synchronization (scenegraph to render tree) is completed for the previous frame. Do I get it correctly? If yes, we'll likely re-introduce the old problem with input event

Re: A different way to handle pulse timing

2013-08-01 Thread Richard Bair
> as far as I can read it, your idea is to start preparing the next frame right > after synchronization (scenegraph to render tree) is completed for the > previous frame. Do I get it correctly? If yes, we'll likely re-introduce the > old problem with input events starvation. There will be no or

Re: A different way to handle pulse timing

2013-08-01 Thread Artem Ananiev
Hi, Richard, as far as I can read it, your idea is to start preparing the next frame right after synchronization (scenegraph to render tree) is completed for the previous frame. Do I get it correctly? If yes, we'll likely re-introduce the old problem with input events starvation. There will be

Re: A different way to handle pulse timing

2013-07-26 Thread David Hill
On 7/26/13 Jul 26, 1:22 AM, Richard Bair wrote: As for multiple scenes, I'm actually curious how this happens today. If I have 2 scenes, and we have just a single render thread servicing both, then when I go to present, it blocks? Or is there a non-blocking present method that we use instead?

A different way to handle pulse timing

2013-07-25 Thread Richard Bair
Hi, I'm probably missing something obvious and you guys on Glass / Prism / Quantum can help set me straight. I was thinking tonight of a different way of initiating pulse events that would, I think, completely smooth out the pulses such that we don't end up with "drift" due to the timer being a