Loading services/vr/bufferhubd/Android.bp +43 −24 Original line number Diff line number Diff line Loading @@ -12,46 +12,65 @@ // See the License for the specific language governing permissions and // limitations under the License. sourceFiles = [ "buffer_channel.cpp", "buffer_hub.cpp", "buffer_node.cpp", "bufferhubd.cpp", "consumer_channel.cpp", "producer_channel.cpp", "consumer_queue_channel.cpp", "producer_queue_channel.cpp", ] headerLibraries = ["libdvr_headers"] staticLibraries = [ "libperformance", "libbufferhub", ] sharedLibraries = [ "libbase", "libbinder", "libcutils", "libgui", "liblog", "libpdx_default_transport", "libsync", "libutils", "libgui", "libui", "libpdx_default_transport", "libutils", ] cc_library_static { name: "libbufferhubd", srcs: [ "binder/android/dvr/IBufferHub.aidl", "buffer_channel.cpp", "buffer_hub.cpp", "buffer_hub_binder.cpp", "buffer_node.cpp", "consumer_channel.cpp", "consumer_queue_channel.cpp", "producer_channel.cpp", "producer_queue_channel.cpp", ], cflags: [ "-DLOG_TAG=\"libbufferhubd\"", "-DTRACE=0", "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", ], export_include_dirs: ["include"], header_libs: ["libdvr_headers"], shared_libs: sharedLibraries, static_libs: [ "libbufferhub", ], aidl: { local_include_dirs: ["binder"], include_dirs: ["frameworks/native/aidl/binder"], export_aidl_headers: true, }, } cc_binary { srcs: sourceFiles, srcs: ["bufferhubd.cpp"], cflags: [ "-DLOG_TAG=\"bufferhubd\"", "-DTRACE=0", "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", ], header_libs: headerLibraries, static_libs: staticLibraries, header_libs: ["libdvr_headers"], shared_libs: sharedLibraries, static_libs: [ "libbufferhub", "libbufferhubd", "libperformance", ], name: "bufferhubd", init_rc: ["bufferhubd.rc"], } subdirs = ["tests"] No newline at end of file services/vr/bufferhubd/binder/android/dvr/IBufferHub.aidl 0 → 100644 +5 −0 Original line number Diff line number Diff line package android.dvr; /** {@hide} */ interface IBufferHub { } No newline at end of file services/vr/bufferhubd/buffer_hub_binder.cpp 0 → 100644 +34 −0 Original line number Diff line number Diff line #include <private/dvr/buffer_hub_binder.h> #include <stdio.h> #include <log/log.h> namespace android { namespace dvr { status_t BufferHubBinderService::start() { ProcessState::self()->startThreadPool(); IPCThreadState::self()->disableBackgroundScheduling(true); status_t result = BinderService<BufferHubBinderService>::publish(); if (result != OK) { ALOGE("Publishing bufferhubd failed with error %d", result); return result; } return result; } status_t BufferHubBinderService::dump(int fd, const Vector<String16> & /* args */) { // TODO(b/115435506): not implemented yet FILE *out = fdopen(dup(fd), "w"); fprintf(out, "BufferHubBinderService::dump(): Not Implemented.\n"); fclose(out); return NO_ERROR; } } // namespace dvr } // namespace android No newline at end of file services/vr/bufferhubd/bufferhubd.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include <dvr/performance_client_api.h> #include <pdx/service_dispatcher.h> #include <private/dvr/buffer_hub_binder.h> #include "buffer_hub.h" Loading Loading @@ -34,11 +35,14 @@ int main(int, char**) { else ALOGI("New nofile limit is %llu/%llu.", rlim.rlim_cur, rlim.rlim_max); CHECK_ERROR(android::dvr::BufferHubBinderService::start() != android::OK, error, "Failed to create bufferhub binder service\n"); dispatcher = android::pdx::ServiceDispatcher::Create(); CHECK_ERROR(!dispatcher, error, "Failed to create service dispatcher\n"); service = android::dvr::BufferHubService::Create(); CHECK_ERROR(!service, error, "Failed to create buffer hub service\n"); CHECK_ERROR(!service, error, "Failed to create bufferhubd service\n"); dispatcher->AddService(service); ret = dvrSetSchedulerClass(0, "graphics"); Loading services/vr/bufferhubd/include/private/dvr/buffer_hub_binder.h 0 → 100644 +23 −0 Original line number Diff line number Diff line #ifndef ANDROID_DVR_BUFFER_HUB_BINDER_H #define ANDROID_DVR_BUFFER_HUB_BINDER_H #include <binder/BinderService.h> #include "android/dvr/BnBufferHub.h" namespace android { namespace dvr { class BufferHubBinderService : public BinderService<BufferHubBinderService>, public BnBufferHub { public: static status_t start(); static const char* getServiceName() { return "bufferhubd"; } // Dump bufferhub related information to given fd (usually stdout) // usage: adb shell dumpsys bufferhubd virtual status_t dump(int fd, const Vector<String16> &args) override; }; } // namespace dvr } // namespace android #endif // ANDROID_DVR_BUFFER_HUB_BINDER_H No newline at end of file Loading
services/vr/bufferhubd/Android.bp +43 −24 Original line number Diff line number Diff line Loading @@ -12,46 +12,65 @@ // See the License for the specific language governing permissions and // limitations under the License. sourceFiles = [ "buffer_channel.cpp", "buffer_hub.cpp", "buffer_node.cpp", "bufferhubd.cpp", "consumer_channel.cpp", "producer_channel.cpp", "consumer_queue_channel.cpp", "producer_queue_channel.cpp", ] headerLibraries = ["libdvr_headers"] staticLibraries = [ "libperformance", "libbufferhub", ] sharedLibraries = [ "libbase", "libbinder", "libcutils", "libgui", "liblog", "libpdx_default_transport", "libsync", "libutils", "libgui", "libui", "libpdx_default_transport", "libutils", ] cc_library_static { name: "libbufferhubd", srcs: [ "binder/android/dvr/IBufferHub.aidl", "buffer_channel.cpp", "buffer_hub.cpp", "buffer_hub_binder.cpp", "buffer_node.cpp", "consumer_channel.cpp", "consumer_queue_channel.cpp", "producer_channel.cpp", "producer_queue_channel.cpp", ], cflags: [ "-DLOG_TAG=\"libbufferhubd\"", "-DTRACE=0", "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", ], export_include_dirs: ["include"], header_libs: ["libdvr_headers"], shared_libs: sharedLibraries, static_libs: [ "libbufferhub", ], aidl: { local_include_dirs: ["binder"], include_dirs: ["frameworks/native/aidl/binder"], export_aidl_headers: true, }, } cc_binary { srcs: sourceFiles, srcs: ["bufferhubd.cpp"], cflags: [ "-DLOG_TAG=\"bufferhubd\"", "-DTRACE=0", "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", ], header_libs: headerLibraries, static_libs: staticLibraries, header_libs: ["libdvr_headers"], shared_libs: sharedLibraries, static_libs: [ "libbufferhub", "libbufferhubd", "libperformance", ], name: "bufferhubd", init_rc: ["bufferhubd.rc"], } subdirs = ["tests"] No newline at end of file
services/vr/bufferhubd/binder/android/dvr/IBufferHub.aidl 0 → 100644 +5 −0 Original line number Diff line number Diff line package android.dvr; /** {@hide} */ interface IBufferHub { } No newline at end of file
services/vr/bufferhubd/buffer_hub_binder.cpp 0 → 100644 +34 −0 Original line number Diff line number Diff line #include <private/dvr/buffer_hub_binder.h> #include <stdio.h> #include <log/log.h> namespace android { namespace dvr { status_t BufferHubBinderService::start() { ProcessState::self()->startThreadPool(); IPCThreadState::self()->disableBackgroundScheduling(true); status_t result = BinderService<BufferHubBinderService>::publish(); if (result != OK) { ALOGE("Publishing bufferhubd failed with error %d", result); return result; } return result; } status_t BufferHubBinderService::dump(int fd, const Vector<String16> & /* args */) { // TODO(b/115435506): not implemented yet FILE *out = fdopen(dup(fd), "w"); fprintf(out, "BufferHubBinderService::dump(): Not Implemented.\n"); fclose(out); return NO_ERROR; } } // namespace dvr } // namespace android No newline at end of file
services/vr/bufferhubd/bufferhubd.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include <dvr/performance_client_api.h> #include <pdx/service_dispatcher.h> #include <private/dvr/buffer_hub_binder.h> #include "buffer_hub.h" Loading Loading @@ -34,11 +35,14 @@ int main(int, char**) { else ALOGI("New nofile limit is %llu/%llu.", rlim.rlim_cur, rlim.rlim_max); CHECK_ERROR(android::dvr::BufferHubBinderService::start() != android::OK, error, "Failed to create bufferhub binder service\n"); dispatcher = android::pdx::ServiceDispatcher::Create(); CHECK_ERROR(!dispatcher, error, "Failed to create service dispatcher\n"); service = android::dvr::BufferHubService::Create(); CHECK_ERROR(!service, error, "Failed to create buffer hub service\n"); CHECK_ERROR(!service, error, "Failed to create bufferhubd service\n"); dispatcher->AddService(service); ret = dvrSetSchedulerClass(0, "graphics"); Loading
services/vr/bufferhubd/include/private/dvr/buffer_hub_binder.h 0 → 100644 +23 −0 Original line number Diff line number Diff line #ifndef ANDROID_DVR_BUFFER_HUB_BINDER_H #define ANDROID_DVR_BUFFER_HUB_BINDER_H #include <binder/BinderService.h> #include "android/dvr/BnBufferHub.h" namespace android { namespace dvr { class BufferHubBinderService : public BinderService<BufferHubBinderService>, public BnBufferHub { public: static status_t start(); static const char* getServiceName() { return "bufferhubd"; } // Dump bufferhub related information to given fd (usually stdout) // usage: adb shell dumpsys bufferhubd virtual status_t dump(int fd, const Vector<String16> &args) override; }; } // namespace dvr } // namespace android #endif // ANDROID_DVR_BUFFER_HUB_BINDER_H No newline at end of file