1a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian/*
2a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * Copyright (C) 2010 The Android Open Source Project
3a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian *
4a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * Licensed under the Apache License, Version 2.0 (the "License");
5a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * you may not use this file except in compliance with the License.
6a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * You may obtain a copy of the License at
7a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian *
8a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian *      http://www.apache.org/licenses/LICENSE-2.0
9a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian *
10a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * Unless required by applicable law or agreed to in writing, software
11a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * distributed under the License is distributed on an "AS IS" BASIS,
12a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * See the License for the specific language governing permissions and
14a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian * limitations under the License.
15a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian */
16edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Project
17a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian#include <binder/BinderService.h>
18edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Project#include <SurfaceFlinger.h>
19edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Project
20edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Projectusing namespace android;
21edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Project
22a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopianint main(int argc, char** argv) {
23a94f129a7bbaa8ea45c50e49ba3e6127ca2a15ecDianne Hackborn    SurfaceFlinger::publishAndJoinThreadPool(true);
2464a1e08b86d72cb375f9dfdf4eb6307f71817350Mathias Agopian    // When SF is launched in its own process, limit the number of
2564a1e08b86d72cb375f9dfdf4eb6307f71817350Mathias Agopian    // binder threads to 4.
2664a1e08b86d72cb375f9dfdf4eb6307f71817350Mathias Agopian    ProcessState::self()->setThreadPoolMaxThreadCount(4);
27a1e6bc864fb821c1b470b7aad9b75c441f54eeb4Mathias Agopian    return 0;
28edbf3b6af777b721cd2a1ef461947e51e88241e1The Android Open Source Project}
29