summaryrefslogtreecommitdiff
path: root/graphics/composer/2.1/default/service.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@google.com>2017-02-02 09:03:20 -0800
committerChia-I Wu <olv@google.com>2017-02-02 09:19:49 -0800
commit16624b69d6218507b2ccd4d3fdb1146e29e572ec (patch)
treebbc831fd357acf54b3cab5a4ee37f786be7b248d /graphics/composer/2.1/default/service.cpp
parentf5589bdf8d00b71ae5a5a616a600709e7e92a5a8 (diff)
graphics: get rid of BINDERIZED
It is always on now and all buffers be cloned and registered. Clients (SF) should make use of the buffer caching mechanism and pass each unique buffer once, to avoid the overhead. Test: manual Change-Id: I74ccbf74e110c8b413a66cfc60044b71ba3f44e3
Diffstat (limited to 'graphics/composer/2.1/default/service.cpp')
-rw-r--r--graphics/composer/2.1/default/service.cpp35
1 files changed, 7 insertions, 28 deletions
diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp
index c2a2b191ed..a31decd3a3 100644
--- a/graphics/composer/2.1/default/service.cpp
+++ b/graphics/composer/2.1/default/service.cpp
@@ -14,41 +14,20 @@
* limitations under the License.
*/
-#define LOG_TAG "HWComposerService"
+#define LOG_TAG "android.hardware.graphics.composer@2.1-service"
+
+#include <android/hardware/graphics/composer/2.1/IComposer.h>
#include <binder/ProcessState.h>
-#include <hidl/HidlTransportSupport.h>
-#include <utils/StrongPointer.h>
-#include "Hwc.h"
+#include <hidl/LegacySupport.h>
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-using android::sp;
using android::hardware::graphics::composer::V2_1::IComposer;
-using android::hardware::graphics::composer::V2_1::implementation::HIDL_FETCH_IComposer;
-
-int main()
-{
- const char instance[] = "hwcomposer";
-
- ALOGI("Service is starting.");
-
- configureRpcThreadpool(1, true /* callerWillJoin */);
- sp<IComposer> service = HIDL_FETCH_IComposer(instance);
- if (service == nullptr) {
- ALOGI("getService returned NULL");
- return -1;
- }
-
- LOG_FATAL_IF(service->isRemote(), "Service is REMOTE!");
-
- service->registerAsService(instance);
+using android::hardware::defaultPassthroughServiceImplementation;
+int main() {
// the conventional HAL might start binder services
android::ProcessState::self()->setThreadPoolMaxThreadCount(4);
android::ProcessState::self()->startThreadPool();
- joinRpcThreadpool();
-
- return 0;
+ return defaultPassthroughServiceImplementation<IComposer>("hwcomposer");
}