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
diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp
index c2a2b19..a31decd 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;
+using android::hardware::defaultPassthroughServiceImplementation;
 
-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);
-
+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");
 }