Loading services/surfaceflinger/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libsurfaceflinger \ libcutils \ liblog \ libbinder \ libutils Loading services/surfaceflinger/SurfaceFlinger.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -22,10 +22,6 @@ #include <math.h> #include <dlfcn.h> #if defined(HAVE_PTHREADS) #include <sys/resource.h> #endif #include <EGL/egl.h> #include <cutils/log.h> Loading Loading @@ -640,9 +636,6 @@ status_t SurfaceFlinger::postMessageSync(const sp<MessageBase>& msg, } void SurfaceFlinger::run() { #if defined(HAVE_PTHREADS) setpriority(PRIO_PROCESS, 0, PRIORITY_URGENT_DISPLAY); #endif do { waitForEvent(); } while (true); Loading services/surfaceflinger/main_surfaceflinger.cpp +14 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,11 @@ * limitations under the License. */ #if defined(HAVE_PTHREADS) #include <sys/resource.h> #endif #include <cutils/sched_policy.h> #include <binder/IServiceManager.h> #include <binder/IPCThreadState.h> #include <binder/ProcessState.h> Loading @@ -27,16 +32,21 @@ int main(int argc, char** argv) { // binder threads to 4. ProcessState::self()->setThreadPoolMaxThreadCount(4); // start the thread pool sp<ProcessState> ps(ProcessState::self()); ps->startThreadPool(); // instantiate surfaceflinger sp<SurfaceFlinger> flinger = new SurfaceFlinger(); #if defined(HAVE_PTHREADS) setpriority(PRIO_PROCESS, 0, PRIORITY_URGENT_DISPLAY); #endif set_sched_policy(0, SP_FOREGROUND); // initialize before clients can connect flinger->init(); // start the thread pool sp<ProcessState> ps(ProcessState::self()); ps->startThreadPool(); // publish surface flinger sp<IServiceManager> sm(defaultServiceManager()); sm->addService(String16(SurfaceFlinger::getServiceName()), flinger, false); Loading Loading
services/surfaceflinger/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libsurfaceflinger \ libcutils \ liblog \ libbinder \ libutils Loading
services/surfaceflinger/SurfaceFlinger.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -22,10 +22,6 @@ #include <math.h> #include <dlfcn.h> #if defined(HAVE_PTHREADS) #include <sys/resource.h> #endif #include <EGL/egl.h> #include <cutils/log.h> Loading Loading @@ -640,9 +636,6 @@ status_t SurfaceFlinger::postMessageSync(const sp<MessageBase>& msg, } void SurfaceFlinger::run() { #if defined(HAVE_PTHREADS) setpriority(PRIO_PROCESS, 0, PRIORITY_URGENT_DISPLAY); #endif do { waitForEvent(); } while (true); Loading
services/surfaceflinger/main_surfaceflinger.cpp +14 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,11 @@ * limitations under the License. */ #if defined(HAVE_PTHREADS) #include <sys/resource.h> #endif #include <cutils/sched_policy.h> #include <binder/IServiceManager.h> #include <binder/IPCThreadState.h> #include <binder/ProcessState.h> Loading @@ -27,16 +32,21 @@ int main(int argc, char** argv) { // binder threads to 4. ProcessState::self()->setThreadPoolMaxThreadCount(4); // start the thread pool sp<ProcessState> ps(ProcessState::self()); ps->startThreadPool(); // instantiate surfaceflinger sp<SurfaceFlinger> flinger = new SurfaceFlinger(); #if defined(HAVE_PTHREADS) setpriority(PRIO_PROCESS, 0, PRIORITY_URGENT_DISPLAY); #endif set_sched_policy(0, SP_FOREGROUND); // initialize before clients can connect flinger->init(); // start the thread pool sp<ProcessState> ps(ProcessState::self()); ps->startThreadPool(); // publish surface flinger sp<IServiceManager> sm(defaultServiceManager()); sm->addService(String16(SurfaceFlinger::getServiceName()), flinger, false); Loading