blob: 8503d4e234de9756492bd6c91e01629d23b8c96e [file] [log] [blame]
Mathias Agopiana1e6bc82010-07-14 18:41:18 -07001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080016
Mathias Agopiana1e6bc82010-07-14 18:41:18 -070017#include <binder/BinderService.h>
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -070018#include "SurfaceFlinger.h"
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080019
20using namespace android;
21
Mathias Agopiana1e6bc82010-07-14 18:41:18 -070022int main(int argc, char** argv) {
Mathias Agopian64a1e082012-04-19 17:31:53 -070023 // When SF is launched in its own process, limit the number of
24 // binder threads to 4.
25 ProcessState::self()->setThreadPoolMaxThreadCount(4);
Mathias Agopian649b9762013-03-07 15:32:47 -080026 SurfaceFlinger::publishAndJoinThreadPool(true);
Mathias Agopiana1e6bc82010-07-14 18:41:18 -070027 return 0;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080028}