Loading include/gui/DisplayEventReceiver.h +3 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,9 @@ public: public: /* * DisplayEventReceiver creates and registers an event connection with * SurfaceFlinger. Events start being delivered immediately. * SurfaceFlinger. VSync events are disabled by default. Call setVSyncRate * or requestNextVsync to receive them. * Other events start being delivered immediately. */ DisplayEventReceiver(); Loading services/surfaceflinger/EventThread.cpp +3 −7 Original line number Diff line number Diff line Loading @@ -151,9 +151,9 @@ bool EventThread::threadLoop() { mLastVSyncTimestamp = timestamp; // now see if we still need to report this VSYNC event bool reportVsync = false; size_t count = mDisplayEventConnections.size(); const size_t count = mDisplayEventConnections.size(); for (size_t i=0 ; i<count ; i++) { bool reportVsync = false; const ConnectionInfo& info( mDisplayEventConnections.valueAt(i)); if (info.count >= 1) { Loading @@ -174,11 +174,7 @@ bool EventThread::threadLoop() { displayEventConnections.add(mDisplayEventConnections.keyAt(i)); } } if (reportVsync) { break; } } while (true); } while (!displayEventConnections.size()); // dispatch vsync events to listeners... vsync.header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC; Loading services/surfaceflinger/tests/vsync/vsync.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ int main(int argc, char** argv) loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver, &myDisplayEvent); myDisplayEvent.setVsyncRate(1); do { //printf("about to poll...\n"); int32_t ret = loop->pollOnce(-1); Loading Loading
include/gui/DisplayEventReceiver.h +3 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,9 @@ public: public: /* * DisplayEventReceiver creates and registers an event connection with * SurfaceFlinger. Events start being delivered immediately. * SurfaceFlinger. VSync events are disabled by default. Call setVSyncRate * or requestNextVsync to receive them. * Other events start being delivered immediately. */ DisplayEventReceiver(); Loading
services/surfaceflinger/EventThread.cpp +3 −7 Original line number Diff line number Diff line Loading @@ -151,9 +151,9 @@ bool EventThread::threadLoop() { mLastVSyncTimestamp = timestamp; // now see if we still need to report this VSYNC event bool reportVsync = false; size_t count = mDisplayEventConnections.size(); const size_t count = mDisplayEventConnections.size(); for (size_t i=0 ; i<count ; i++) { bool reportVsync = false; const ConnectionInfo& info( mDisplayEventConnections.valueAt(i)); if (info.count >= 1) { Loading @@ -174,11 +174,7 @@ bool EventThread::threadLoop() { displayEventConnections.add(mDisplayEventConnections.keyAt(i)); } } if (reportVsync) { break; } } while (true); } while (!displayEventConnections.size()); // dispatch vsync events to listeners... vsync.header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC; Loading
services/surfaceflinger/tests/vsync/vsync.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ int main(int argc, char** argv) loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver, &myDisplayEvent); myDisplayEvent.setVsyncRate(1); do { //printf("about to poll...\n"); int32_t ret = loop->pollOnce(-1); Loading