summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/EventThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/EventThread.cpp')
-rw-r--r--services/surfaceflinger/EventThread.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index f647742e2c..a1a042039c 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -34,14 +34,6 @@
// ---------------------------------------------------------------------------
namespace android {
// ---------------------------------------------------------------------------
-// time to wait between VSYNC requests before sending a VSYNC OFF power hint: 40msec.
-const long vsyncHintOffDelay = 40000000;
-
-static void vsyncOffCallback(union sigval val) {
- EventThread *ev = (EventThread *)val.sival_ptr;
- ev->sendVsyncHintOff();
- return;
-}
EventThread::EventThread(const sp<VSyncSource>& src, SurfaceFlinger& flinger, bool interceptVSyncs)
: mVSyncSource(src),
@@ -49,7 +41,6 @@ EventThread::EventThread(const sp<VSyncSource>& src, SurfaceFlinger& flinger, bo
mUseSoftwareVSync(false),
mVsyncEnabled(false),
mDebugVsyncEnabled(false),
- mVsyncHintSent(false),
mInterceptVSyncs(interceptVSyncs) {
for (int32_t i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
@@ -58,18 +49,6 @@ EventThread::EventThread(const sp<VSyncSource>& src, SurfaceFlinger& flinger, bo
mVSyncEvent[i].header.timestamp = 0;
mVSyncEvent[i].vsync.count = 0;
}
- struct sigevent se;
- se.sigev_notify = SIGEV_THREAD;
- se.sigev_value.sival_ptr = this;
- se.sigev_notify_function = vsyncOffCallback;
- se.sigev_notify_attributes = NULL;
- timer_create(CLOCK_MONOTONIC, &se, &mTimerId);
-}
-
-void EventThread::sendVsyncHintOff() {
- Mutex::Autolock _l(mLock);
- mPowerHAL.vsyncHint(false);
- mVsyncHintSent = false;
}
void EventThread::setPhaseOffset(nsecs_t phaseOffset) {
@@ -77,19 +56,6 @@ void EventThread::setPhaseOffset(nsecs_t phaseOffset) {
mVSyncSource->setPhaseOffset(phaseOffset);
}
-void EventThread::sendVsyncHintOnLocked() {
- struct itimerspec ts;
- if(!mVsyncHintSent) {
- mPowerHAL.vsyncHint(true);
- mVsyncHintSent = true;
- }
- ts.it_value.tv_sec = 0;
- ts.it_value.tv_nsec = vsyncHintOffDelay;
- ts.it_interval.tv_sec = 0;
- ts.it_interval.tv_nsec = 0;
- timer_settime(mTimerId, 0, &ts, NULL);
-}
-
void EventThread::onFirstRef() {
run("EventThread", PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
}
@@ -357,7 +323,6 @@ void EventThread::enableVSyncLocked() {
}
}
mDebugVsyncEnabled = true;
- sendVsyncHintOnLocked();
}
void EventThread::disableVSyncLocked() {