On Friday, May 2, 2014 10:06:38 AM UTC-7, Maksym Kreshchuk wrote: > > It calls: > 1. After every hardware vsync - 60 times per second. > 2. After every displayed frame - for 30fps video it's 30 times per second. > 3. In threadLoop - not sure but ~60 times per second. >
The amount of added work should be minor. Without it, on every hardware VSYNC the system wake up SurfaceFlinger and wakes up all apps. With it, you still do that, but instead of it all happening at once it gets distributed. For example, on Nexus 5, SurfaceFlinger wakes up at VSYNC + 5ms, and apps wake up at VSYNC + 7.5ms. If you configure your boardconfig values for VSYNC_EVENT_PHASE_OFFSET_NS and SF_VSYNC_EVENT_PHASE_OFFSET_NS to zero, you should get the old "everybody wake up at once" behavior. Hardware VSYNC is disabled entirely unless DispSync believes that it is falling out of sync with the actual refresh. If it does, it turns hardware VSYNC back on and re-synchronizes. It determines the loss of synchronicity by watching the release fences, which should be signaled at VSYNC. (If they're signaled slightly before VSYNC is reported, you can specify an offset with PRESENT_TIME_OFFSET_FROM_VSYNC_NS in the boardconfig). If it's constantly attempting to resynchronize, you should figure out why that is. Maybe PRESENT_TIME_OFFSET_FROM_VSYNC_NS needs to be set? Is the monotonic clock not working properly on your device? -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.