Re: vsync proposal

2013-09-06 Thread Jeff Gilbert
...@yahoo.com Sent: Thursday, September 5, 2013 7:51:02 PM Subject: Re: vsync proposal I had some off-thread discussion with Bas about lowering latency. We seem to have agreed on the following plan: On some non-main thread: 1. Wait for vsync event 2. Dispatch refresh driver ticks to all windows

Re: vsync proposal

2013-09-06 Thread Robert O'Callahan
On Sat, Sep 7, 2013 at 7:02 AM, Jeff Gilbert jgilb...@mozilla.com wrote: Could you clarify number 2? It's a little dense. A better way to state it is this: every layer tree update by the main thread eventually gets a response in the form of a vsync-driven request to tick the corresponding

Re: vsync proposal

2013-09-06 Thread Robert O'Callahan
On Fri, Sep 6, 2013 at 2:51 PM, Robert O'Callahan rob...@ocallahan.orgwrote: On some non-main thread: 1. Wait for vsync event 2. Dispatch refresh driver ticks to all windows that don't already have a pending refresh driver tick unacknowledged by a layer tree update response 3. Wait for N ms,

Re: vsync proposal

2013-09-05 Thread Robert O'Callahan
I had some off-thread discussion with Bas about lowering latency. We seem to have agreed on the following plan: On some non-main thread: 1. Wait for vsync event 2. Dispatch refresh driver ticks to all windows that don't already have a pending refresh driver tick unacknowledged by a layer tree

Re: vsync proposal

2013-08-15 Thread Bas Schouten
PM Subject: Re: vsync proposal On Wed, Aug 14, 2013 at 9:39 PM, Bas Schouten bschou...@mozilla.com wrote: From: Robert O'Callahan rob...@ocallahan.org That would be good in some ways, but it doesn't handle off-main-thread animation when the main thread's drawing is late (e.g. because

Re: vsync proposal

2013-08-14 Thread Bas Schouten
Subject: Re: vsync proposal On Wed, Aug 14, 2013 at 12:13 PM, Bas Schouten bschou...@mozilla.comwrote: Since you want composition to occur whenever drawing has occurred, I don't really think it should really be what's working on doing any processing for the vblank event. The VBlank

Re: vsync proposal

2013-08-14 Thread Robert O'Callahan
On Wed, Aug 14, 2013 at 9:39 PM, Bas Schouten bschou...@mozilla.com wrote: From: Robert O'Callahan rob...@ocallahan.org That would be good in some ways, but it doesn't handle off-main-thread animation when the main thread's drawing is late (e.g. because the main thread is stuck doing

Re: vsync proposal

2013-08-13 Thread Jeff Muizelaar
On 2013-08-12, at 11:05 PM, Robert O'Callahan wrote: Tell me what you think. https://wiki.mozilla.org/User:Roc/VsyncProposal A couple things that are not clear to me from this proposal: - when the vsync event is sent? - how does it deal with a blocking swapbuffers()? - what happens in the

Re: vsync proposal

2013-08-13 Thread Robert O'Callahan
On Wed, Aug 14, 2013 at 2:13 AM, Jeff Muizelaar jmuizel...@mozilla.comwrote: On 2013-08-12, at 11:05 PM, Robert O'Callahan wrote: Tell me what you think. https://wiki.mozilla.org/User:Roc/VsyncProposal A couple things that are not clear to me from this proposal: - when the vsync event

Re: vsync proposal

2013-08-13 Thread Bas Schouten
Subject: Re: vsync proposal A couple things that are not clear to me from this proposal: - when the vsync event is sent? Depends on the platform. I believe on Windows we can call DwmFlush on a helper thread and fire it when that returns. Calling DwmFlush is bad. Calling http

Re: vsync proposal

2013-08-13 Thread Robert O'Callahan
On Wed, Aug 14, 2013 at 12:13 PM, Bas Schouten bschou...@mozilla.comwrote: Since you want composition to occur whenever drawing has occurred, I don't really think it should really be what's working on doing any processing for the vblank event. The VBlank event should just fire,

Re: vsync proposal

2013-08-13 Thread Jeff Gilbert
vladi...@mozilla.com, dev-platform@lists.mozilla.org, avih...@yahoo.com Sent: Tuesday, August 13, 2013 6:25:03 PM Subject: Re: vsync proposal On Wed, Aug 14, 2013 at 12:13 PM, Bas Schouten bschou...@mozilla.comwrote: Since you want composition to occur whenever drawing has occurred, I don't

Re: vsync proposal

2013-08-13 Thread K. Gadd
I'm not sure you can ever achieve 'ideal' results when it comes to the interaction between requestAnimationFrame and vsync. requestAnimationFrame is fundamentally flawed for combining low latency with tearing-free presentation because it conceptually ties updating, rendering and presentation all

vsync proposal

2013-08-12 Thread Robert O'Callahan
Tell me what you think. https://wiki.mozilla.org/User:Roc/VsyncProposal Rob -- Jtehsauts tshaei dS,o n Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.rt sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r sGients uapr,e tfaokreg

Re: vsync proposal

2013-08-12 Thread Robert O'Callahan
On Tue, Aug 13, 2013 at 3:05 PM, Robert O'Callahan rob...@ocallahan.orgwrote: Tell me what you think. https://wiki.mozilla.org/User:Roc/VsyncProposal Forgot to mention --- this is the result of brainstorming with Matt Woodrow and Nick Cameron this morning. Rob -- Jtehsauts tshaei dS,o n

Re: vsync proposal

2013-08-12 Thread Jet Villegas
platforms scales well. --Jet - Original Message - From: Robert O'Callahan rob...@ocallahan.org To: dev-platform@lists.mozilla.org, Vladimir Vukicevic vladi...@mozilla.com, avih...@yahoo.com, Bas Schouten bschou...@mozilla.com Sent: Monday, August 12, 2013 8:08:18 PM Subject: Re: vsync