From b662198436ce259ec5627a5cd4723bbc7268ee20 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 5 Mar 2020 10:56:38 +0900 Subject: [PATCH] add initial code for DSBufferQueue Change-Id: I088b0523fae5c28ebb8e9398f63820bbb986f9d6 --- meson.build | 21 ++++++++++++++++----- src/lib/DSBuffer/DSBufferQueue.cpp | 10 ++++++++++ src/lib/DSBuffer/DSBufferQueue.h | 15 +++++++++++++++ src/lib/DSRender/DSDaliRenderer.h | 35 +++++++++++++++++++++++++++++++++++ tests/DSBufferQueue-test.cpp | 17 +++++++++++++++++ tests/meson.build | 27 +++++++++++++++++---------- 6 files changed, 110 insertions(+), 15 deletions(-) create mode 100644 src/lib/DSBuffer/DSBufferQueue.cpp create mode 100644 src/lib/DSBuffer/DSBufferQueue.h create mode 100644 src/lib/DSRender/DSDaliRenderer.h create mode 100644 tests/DSBufferQueue-test.cpp diff --git a/meson.build b/meson.build index 482c06b..952c16d 100644 --- a/meson.build +++ b/meson.build @@ -12,9 +12,12 @@ dir_bin = join_paths(dir_prefix, get_option('bindir')) ## libds -install_headers('src/lib/DSObject.h', +install_headers( + 'src/lib/DSObject.h', 'src/lib/DSSignal.h', - 'src/lib/DSRefBase.h') + 'src/lib/DSRefBase.h', + 'src/lib/DSBuffer/DSBufferQueue.h', + ) src_libds = [ 'src/lib/DSRefBase.cpp', @@ -29,18 +32,26 @@ src_libds = [ 'src/lib/DSProperty.cpp', 'src/lib/DSProperty.h', 'src/lib/DSPropertyPrivate.cpp', - 'src/lib/DSPropertyPrivate.h' -] + 'src/lib/DSPropertyPrivate.h', + 'src/lib/DSBuffer/DSBufferQueue.cpp', + 'src/lib/DSBuffer/DSBufferQueue.h', + ] pkgconfig = import('pkgconfig') deps_libds = [] link_args = '-W' +ds_inc = include_directories( + 'src/lib', + 'src/lib/DSBuffer', + ) + lib_libds = shared_library( 'libds', src_libds, dependencies : deps_libds, + include_directories : [ds_inc], version : meson.project_version(), link_args : link_args, install : true @@ -49,7 +60,7 @@ lib_libds = shared_library( dep_libds = declare_dependency( link_with : lib_libds, dependencies : deps_libds, - include_directories : 'src/lib') + include_directories : [ds_inc]) pkgconfig.generate( filebase : 'libds', diff --git a/src/lib/DSBuffer/DSBufferQueue.cpp b/src/lib/DSBuffer/DSBufferQueue.cpp new file mode 100644 index 0000000..afc4948 --- /dev/null +++ b/src/lib/DSBuffer/DSBufferQueue.cpp @@ -0,0 +1,10 @@ +#include "DSBufferQueue.h" + +namespace display_server +{ + +DSBufferQueue::DSBufferQueue() {} + +DSBufferQueue::~DSBufferQueue() {} + +} // display_server diff --git a/src/lib/DSBuffer/DSBufferQueue.h b/src/lib/DSBuffer/DSBufferQueue.h new file mode 100644 index 0000000..248bd84 --- /dev/null +++ b/src/lib/DSBuffer/DSBufferQueue.h @@ -0,0 +1,15 @@ +#ifndef __DSBUFFERQUEUE_H +#define __DSBUFFERQUEUE_H + +namespace display_server { + +class DSBufferQueue { +private: + +public: + DSBufferQueue(); + virtual ~DSBufferQueue(); +}; + +} +#endif /* __DSBUFFERQUEUE_H */ diff --git a/src/lib/DSRender/DSDaliRenderer.h b/src/lib/DSRender/DSDaliRenderer.h new file mode 100644 index 0000000..313806b --- /dev/null +++ b/src/lib/DSRender/DSDaliRenderer.h @@ -0,0 +1,35 @@ +#ifndef __DSDALIRENDERER_H +#define __DSDALIRENDERER_H + +#include + +namespace display_server { + +class DSDaliRenderView : public DSRenderView +{ +private: +public: + DSDaliRenderView() {} + virtual ~DSDaliRenderView() {} +}; + +class DSDaliRenderer : public DSRenderer +{ +private: +public: + DSDaliRenderer() {}; + virtual ~DSDaliRenderer() {}; + + DSRenderView* NewRenderView() { + DSRenderView* renderView = new DSDaliRenderView(); + + return renderView; + } + + bool RenderFrame () { + std::cout << "[DALi] RenderFrame\n"; + }; +}; + +} +#endif \ No newline at end of file diff --git a/tests/DSBufferQueue-test.cpp b/tests/DSBufferQueue-test.cpp new file mode 100644 index 0000000..8f4a8d9 --- /dev/null +++ b/tests/DSBufferQueue-test.cpp @@ -0,0 +1,17 @@ +#include "libds-tests.h" +#include "DSBufferQueue.h" + +using namespace display_server; + +class DSBufferQueueTest : public ::testing::Test +{ +public: + void SetUp(void) override {} + void TearDown(void) override {} +}; + +TEST_F(DSBufferQueueTest, CreateBufferQueue) +{ + // TODO: + ASSERT_TRUE(true); +} diff --git a/tests/meson.build b/tests/meson.build index 03ef65f..07f58e1 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,14 +1,21 @@ -incdir = include_directories('../src/lib') -libds_unittests_src = ['libds-tests.cpp', - 'DSRefBase-test.cpp', - 'DSProperty-test.cpp'] +incdir = include_directories( + '../src/lib', + '../src/lib/DSBuffer', + ) + +libds_unittests_src = [ + 'libds-tests.cpp', + 'DSRefBase-test.cpp', + 'DSProperty-test.cpp', + 'DSBufferQueue-test.cpp', + ] gmock_dep = dependency('gmock', method : 'pkg-config') executable('libds-unittests', libds_unittests_src, - include_directories : incdir, - link_with : lib_libds, - dependencies : gmock_dep, - install_dir : dir_bin, - install : true - ) + include_directories : incdir, + link_with : lib_libds, + dependencies : gmock_dep, + install_dir : dir_bin, + install : true) + -- 2.7.4