Merge branch 'devel/master' into devel/vulkan
authorFrancisco Santos <f1.santos@samsung.com>
Mon, 20 Mar 2017 11:37:18 +0000 (11:37 +0000)
committerFrancisco Santos <f1.santos@samsung.com>
Mon, 20 Mar 2017 11:37:18 +0000 (11:37 +0000)
20 files changed:
.clang-format [new file with mode: 0644]
automated-tests/scripts/tcheadgen.sh
automated-tests/src/dali-graphics/CMakeLists.txt [new file with mode: 0644]
automated-tests/src/dali-graphics/tct-dali-graphics-core.cpp [new file with mode: 0644]
automated-tests/src/dali-graphics/utc-Dali-Graphics-API-texture.cpp [new file with mode: 0644]
automated-tests/src/dali-graphics/utc-Dali-Graphics-API.cpp [new file with mode: 0644]
automated-tests/src/dali-graphics/utc-Dali-Graphics-Manager.cpp [new file with mode: 0644]
build/tizen/configure.ac
build/tizen/dali-core/Makefile.am
build/tizen/dali-core/graphics/Makefile.am [new file with mode: 0644]
dali/graphics-api/file.list [new file with mode: 0644]
dali/graphics-api/graphics-api-handle.h [new file with mode: 0644]
dali/graphics-api/graphics-api-manager.h [new file with mode: 0644]
dali/graphics-api/graphics-api-texture.h [new file with mode: 0644]
dali/graphics-api/graphics-api-utility.h [new file with mode: 0644]
dali/graphics/file.list [new file with mode: 0644]
dali/graphics/graphics-manager.cpp [new file with mode: 0644]
dali/graphics/graphics-manager.h [new file with mode: 0644]
dali/graphics/graphics-texture.h [new file with mode: 0644]
dali/internal/update/manager/update-manager.cpp

diff --git a/.clang-format b/.clang-format
new file mode 100644 (file)
index 0000000..6ef73d4
--- /dev/null
@@ -0,0 +1,103 @@
+---
+Language:        Cpp
+BasedOnStyle:  Google
+AccessModifierOffset: -2
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+
+AlignEscapedNewlinesLeft: true
+AlignOperands:   true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: true
+AlwaysBreakTemplateDeclarations: true
+
+BinPackArguments: true
+BinPackParameters: true
+
+BraceWrapping:
+  AfterClass:      false
+  AfterControlStatement: false
+  AfterEnum:       false
+  AfterFunction:   false
+  AfterNamespace:  false
+  AfterObjCDeclaration: false
+  AfterStruct:     false
+  AfterUnion:      false
+  BeforeCatch:     false
+  BeforeElse:      false
+  IndentBraces:    false
+
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Allman
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: false
+BreakAfterJavaFieldAnnotations: false
+BreakStringLiterals: false
+ColumnLimit:     100
+CommentPragmas:  '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 0
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: true
+DisableFormat:   false
+ExperimentalAutoDetectBinPacking: true
+ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+IncludeCategories:
+  - Regex:           '^<.*\.h>'
+    Priority:        1
+  - Regex:           '^<.*'
+    Priority:        2
+  - Regex:           '.*'
+    Priority:        3
+IncludeIsMainRegex: '([-_](test|unittest))?$'
+IndentCaseLabels: false
+IndentWidth:     2
+IndentWrappedFunctionNames: false
+JavaScriptQuotes: Leave
+JavaScriptWrapImports: true
+KeepEmptyLinesAtTheStartOfBlocks: true
+MacroBlockBegin: ''
+MacroBlockEnd:   ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: false
+PenaltyBreakBeforeFirstCallParameter: 50
+PenaltyBreakComment: 300000000
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1
+PenaltyReturnTypeOnItsOwnLine: 200
+PointerAlignment: Left
+ReflowComments:  false
+SortIncludes:    true
+SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: Never
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles:  true
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: true
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard:        Auto
+TabWidth:        2
+UseTab:          Never
+...
+
+
index c7b7700..d809d55 100755 (executable)
@@ -31,6 +31,8 @@ awk -F',' -v HEADER_NAME="$HEADER_NAME" '
 print "#ifndef __" HEADER_NAME "__"
 print "#define __" HEADER_NAME "__"
 print ""
+print "#include <cstdio>"
+print ""
 print "#include \"testcase.h\""
 print ""
     }
diff --git a/automated-tests/src/dali-graphics/CMakeLists.txt b/automated-tests/src/dali-graphics/CMakeLists.txt
new file mode 100644 (file)
index 0000000..309769b
--- /dev/null
@@ -0,0 +1,52 @@
+SET(PKG_NAME "dali-graphics")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "dali-internal")
+
+SET(TC_SOURCES
+  utc-Dali-Graphics-API.cpp
+)
+
+LIST(APPEND TC_SOURCES
+        ../dali/dali-test-suite-utils/mesh-builder.cpp
+        ../dali/dali-test-suite-utils/test-harness.cpp
+        ../dali/dali-test-suite-utils/test-actor-utils.cpp
+        ../dali/dali-test-suite-utils/dali-test-suite-utils.cpp
+        ../dali/dali-test-suite-utils/test-application.cpp
+        ../dali/dali-test-suite-utils/test-gesture-manager.cpp
+        ../dali/dali-test-suite-utils/test-gl-abstraction.cpp
+        ../dali/dali-test-suite-utils/test-gl-sync-abstraction.cpp
+        ../dali/dali-test-suite-utils/test-native-image.cpp
+        ../dali/dali-test-suite-utils/test-platform-abstraction.cpp
+        ../dali/dali-test-suite-utils/test-render-controller.cpp
+        ../dali/dali-test-suite-utils/test-trace-call-stack.cpp
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+     dali-core
+)
+
+SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} ${${CAPI_LIB}_CFLAGS_OTHER} -O0 -ggdb --coverage -Wall -Werror -std=c++14 ")
+
+FOREACH(directory ${${CAPI_LIB}_LIBRARY_DIRS})
+    SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -L${directory}")
+ENDFOREACH(directory ${CAPI_LIB_LIBRARY_DIRS})
+
+INCLUDE_DIRECTORIES(
+    ../../..
+    .
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+    ../dali/dali-test-suite-utils
+    ../dali-devel
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${EXEC_NAME}
+)
diff --git a/automated-tests/src/dali-graphics/tct-dali-graphics-core.cpp b/automated-tests/src/dali-graphics/tct-dali-graphics-core.cpp
new file mode 100644 (file)
index 0000000..e0fe720
--- /dev/null
@@ -0,0 +1,51 @@
+#include "tct-dali-graphics-core.h"
+#include <getopt.h>
+#include <stdlib.h>
+#include <string.h>
+#include <test-harness.h>
+
+int main(int argc, char* const argv[])
+{
+  int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
+
+  const char* optString = "rs";
+  bool        optRerunFailed(true);
+  bool        optRunSerially(false);
+
+  int nextOpt = 0;
+  do
+  {
+    nextOpt = getopt(argc, argv, optString);
+    switch(nextOpt)
+    {
+    case 'r':
+      optRerunFailed = true;
+      break;
+    case 's':
+      optRunSerially = true;
+      break;
+    case '?':
+      TestHarness::Usage(argv[0]);
+      exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT);
+      break;
+    }
+  } while(nextOpt != -1);
+
+  if(optind == argc) // no testcase name in argument list
+  {
+    if(optRunSerially)
+    {
+      result = TestHarness::RunAll(argv[0], tc_array);
+    }
+    else
+    {
+      result = TestHarness::RunAllInParallel(argv[0], tc_array, optRerunFailed);
+    }
+  }
+  else
+  {
+    // optind is index of next argument - interpret as testcase name
+    result = TestHarness::FindAndRunTestCase(tc_array, argv[optind]);
+  }
+  return result;
+}
diff --git a/automated-tests/src/dali-graphics/utc-Dali-Graphics-API-texture.cpp b/automated-tests/src/dali-graphics/utc-Dali-Graphics-API-texture.cpp
new file mode 100644 (file)
index 0000000..7f4cee5
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali-test-suite-utils.h>
+#include <dali/graphics-api/graphics-api-texture.h>
+
+using Dali::Graphics::API::Texture;
+
+void utc_dali_internal_memorypoolobjectallocator_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_internal_memorypoolobjectallocator_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+class TestTexture : public Texture
+{
+public:
+  virtual int GetNumber() const override
+  {
+    return 42;
+  }
+
+  virtual Texture
+};
+
+} // namespace
+
+int UtcDaliGraphicsAPI(void)
+{
+  TestTexture testTexture;
+
+  END_TEST;
+}
diff --git a/automated-tests/src/dali-graphics/utc-Dali-Graphics-API.cpp b/automated-tests/src/dali-graphics/utc-Dali-Graphics-API.cpp
new file mode 100644 (file)
index 0000000..361fd2d
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali-test-suite-utils.h>
+#include <dali/graphics-api/graphics-api-manager.h>
+
+using Dali::Graphics::API::Manager;
+
+void utc_dali_internal_memorypoolobjectallocator_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_internal_memorypoolobjectallocator_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+class TestManager : public Manager
+{
+public:
+  virtual int GetNumber() const override
+  {
+    return 42;
+  }
+};
+
+} // namespace
+
+int UtcDaliGraphicsAPI(void)
+{
+  TestManager testManager;
+
+  auto n = testManager.GetNumber();
+
+  DALI_TEST_EQUALS(n, 42, TEST_LOCATION);
+
+  END_TEST;
+}
diff --git a/automated-tests/src/dali-graphics/utc-Dali-Graphics-Manager.cpp b/automated-tests/src/dali-graphics/utc-Dali-Graphics-Manager.cpp
new file mode 100644 (file)
index 0000000..1920e2c
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali-test-suite-utils.h>
+#include <dali/graphics/graphics-manager.h>
+
+using Dali::Graphics::Manager;
+
+void utc_dali_internal_memorypoolobjectallocator_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_internal_memorypoolobjectallocator_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+int UtcDaliGraphicsManagerCreation(void)
+{
+  Manager manager;
+
+  END_TEST;
+}
+
+int UtcDaliGraphicsManagerCreateTexture(void)
+{
+  Manager manager;
+
+  //  auto texture = manager.CreateTexture();
+
+  END_TEST;
+}
index bebc98a..3439dd9 100644 (file)
@@ -121,6 +121,7 @@ AC_SUBST(devincludepath)
 AC_CONFIG_FILES([
  Makefile
  dali-core/Makefile
+ dali-core/graphics/Makefile
  dali-core.pc
 ])
 
index ad081d5..243da9e 100644 (file)
@@ -13,6 +13,8 @@
 # limitations under the License.
 #
 
+SUBDIRS = graphics
+
 # Parse each file.list
 # These files define <module>_src_files & <module>_header_files,
 # where <module> is the subdirectory from core_src_dir
@@ -54,6 +56,7 @@ libdali_core_la_CXXFLAGS = -DDALI_COMPILATION \
                            $(DALI_CFLAGS)
 
 libdali_core_la_LIBADD = $(DALI_LDFLAGS) \
+                         graphics/libdali-graphics.a \
                          -lpthread
 
 # Install headers under the correct subdirectories
diff --git a/build/tizen/dali-core/graphics/Makefile.am b/build/tizen/dali-core/graphics/Makefile.am
new file mode 100644 (file)
index 0000000..6e8fb9c
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Parse each file.list
+# These files define <module>_src_files & <module>_header_files,
+# where <module> is the subdirectory from core_src_dir
+
+graphics_api_src_dir = ../../../../dali/graphics-api
+include ../../../../dali/graphics-api/file.list
+
+graphics_src_dir = ../../../../dali/graphics
+include ../../../../dali/graphics/file.list
+
+
+# Build the graphics library
+noinst_LIBRARIES = libdali-graphics.a
+
+libdali_graphics_a_SOURCES = $(graphics_api_src_files) \
+                             $(graphics_src_files)
+
+#libdali_graphics_a_LDFLAGS = -fPIC
+
+
+dali_core_includes = \
+                     -I../../../..
+
+
+gcc_flags = -Wno-return-local-addr -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override \
+            -Wstack-usage=128 -Wunsafe-loop-optimizations -Wzero-as-null-pointer-constant -Wuseless-cast
+
+cxx_more_warnings = -Wold-style-cast -Woverloaded-virtual -Wdouble-promotion -Wswitch-enum \
+                    -Wfloat-equal -Wshadow \
+                    -Wlarger-than=128 -Wframe-larger-than=128 \
+                    -Wcast-qual -Wcast-align \
+                    -Wconversion -Wsign-conversion \
+                    -W
+
+# the following warnings should not be enforced
+cxx_warnings_to_remove = \
+                         -Wno-c++98-compat
+
+#the following warnings should be added back when possible
+cxx_warnings_to_preserve = \
+                           -Wno-weak-vtables
+
+cxx_flags = -fPIC -std=c++14 -Werror -Wall -Wextra -Weffc++ -Wpedantic \
+            $(cxx_more_warnings) $(cxx_warnings_to_remove) $(cxx_warnings_to_preserve)
+
+libdali_graphics_a_CXXFLAGS = $(cxx_flags) \
+                              $(dali_core_includes) \
+                              $(DALI_CFLAGS)
+
+
diff --git a/dali/graphics-api/file.list b/dali/graphics-api/file.list
new file mode 100644 (file)
index 0000000..95b0717
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Add graphics-api source files here
+#
+
+graphics_api_src_files =
+
diff --git a/dali/graphics-api/graphics-api-handle.h b/dali/graphics-api/graphics-api-handle.h
new file mode 100644 (file)
index 0000000..13d3722
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef DALI_GRAPHICS_API_HANDLE_H
+#define DALI_GRAPHICS_API_HANDLE_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <memory>
+
+namespace Dali
+{
+namespace Graphics
+{
+namespace API
+{
+
+template< typename T >
+class Handle
+{
+public:
+  constexpr Handle(T& reference) : mObject(reference)
+  {
+  }
+
+  Handle(const Handle&) = default;
+  Handle& operator=(const Handle&) = default;
+
+  Handle(Handle&&) = default;
+  Handle& operator=(Handle&&) = default;
+
+  ~Handle() = default;
+
+  T* operator->()
+  {
+    return &mObject;
+  }
+
+  constexpr const T* operator->() const
+  {
+    return &mObject;
+  }
+
+  T& operator()()
+  {
+    return mObject;
+  }
+
+  constexpr const T& operator()() const
+  {
+    return mObject;
+  }
+
+private:
+  T& mObject;
+};
+
+} // namespace API
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_API_HANDLE_H
diff --git a/dali/graphics-api/graphics-api-manager.h b/dali/graphics-api/graphics-api-manager.h
new file mode 100644 (file)
index 0000000..dc22664
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef DALI_GRAPHICS_API_MANAGER_H
+#define DALI_GRAPHICS_API_MANAGER_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/graphics-api/graphics-api-texture.h>
+
+namespace Dali
+{
+namespace Graphics
+{
+namespace API
+{
+
+/**
+ * @brief Interface class for Manager types in the graphics API.
+ */
+class Manager
+{
+public:
+  /**
+   * Dummy method
+   */
+  virtual int GetNumber() const = 0;
+
+  // not copyable
+  Manager(const Manager&) = delete;
+  Manager& operator=(const Manager&) = delete;
+
+  virtual ~Manager() = default;
+
+protected:
+  // derived types should not be moved direcly to prevent slicing
+  Manager(Manager&&) = default;
+  Manager& operator=(Manager&&) = default;
+
+  /**
+   * Objects of this type should not directly.
+   */
+  Manager() = default;
+};
+
+} // namespace API
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_API_MANAGER_H
diff --git a/dali/graphics-api/graphics-api-texture.h b/dali/graphics-api/graphics-api-texture.h
new file mode 100644 (file)
index 0000000..b6905f9
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef DALI_GRAPHICS_API_TEXTURE_H
+#define DALI_GRAPHICS_API_TEXTURE_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/graphics-api/graphics-api-handle.h>
+
+namespace Dali
+{
+namespace Graphics
+{
+namespace API
+{
+
+/**
+ * @brief Interface class for Texture types in the graphics API.
+ */
+class Texture
+{
+public:
+  // not copyable
+  Texture(const Texture&) = delete;
+  Texture& operator=(const Texture&) = delete;
+
+  virtual ~Texture() = default;
+
+protected:
+  // derived types should not be moved direcly to prevent slicing
+  Texture(Texture&&) = default;
+  Texture& operator=(Texture&&) = default;
+
+  /**
+   * Objects of this type should not directly.
+   */
+  Texture() = default;
+};
+
+using TextureHandle = Handle< Texture >;
+
+} // namespace API
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_API_TEXTURE_H
diff --git a/dali/graphics-api/graphics-api-utility.h b/dali/graphics-api/graphics-api-utility.h
new file mode 100644 (file)
index 0000000..873a724
--- /dev/null
@@ -0,0 +1,35 @@
+
+#ifndef DALI_GRAPHICS_API_UTILITY_H
+#define DALI_GRAPHICS_API_UTILITY_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+namespace Dali
+{
+namespace Graphics
+{
+namespace API
+{
+
+} // namespace API
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_API_UTILITY_H
diff --git a/dali/graphics/file.list b/dali/graphics/file.list
new file mode 100644 (file)
index 0000000..2bcc083
--- /dev/null
@@ -0,0 +1,4 @@
+# Add graphics source files here
+
+graphics_src_files = \
+  $(graphics_src_dir)/graphics-manager.cpp
diff --git a/dali/graphics/graphics-manager.cpp b/dali/graphics/graphics-manager.cpp
new file mode 100644 (file)
index 0000000..aa44675
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/graphics/graphics-manager.h>
+
+
+namespace Dali
+{
+namespace Graphics
+{
+
+int Manager::GetNumber() const
+{
+  return 42;
+}
+
+
+} // namespace Graphics
+} // namespace Dali
+
diff --git a/dali/graphics/graphics-manager.h b/dali/graphics/graphics-manager.h
new file mode 100644 (file)
index 0000000..32610c7
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef DALI_GRAPHICS_MANAGER_H
+#define DALI_GRAPHICS_MANAGER_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/graphics-api/graphics-api-manager.h>
+
+namespace Dali
+{
+namespace Graphics
+{
+
+/**
+ * @brief Manager implementation of the graphics API
+ */
+class Manager final : public API::Manager
+{
+public:
+  Manager() = default;
+
+  Manager(const Manager&) = delete;
+  Manager& operator=(const Manager&) = delete;
+
+  Manager(Manager&&) = default;
+  Manager& operator=(Manager&&) = default;
+
+  virtual ~Manager() = default;
+
+  /**
+   * Dummy method
+   */
+  int GetNumber() const;
+};
+
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_MANAGER_H
diff --git a/dali/graphics/graphics-texture.h b/dali/graphics/graphics-texture.h
new file mode 100644 (file)
index 0000000..2a51df0
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef DALI_GRAPHICS_TEXTURE_H
+#define DALI_GRAPHICS_TEXTURE_H
+
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/graphics-api/graphics-api-texture.h>
+
+namespace Dali
+{
+namespace Graphics
+{
+
+/**
+ * @brief Manager implementation of the graphics API
+ */
+class Manager final : public API::Manager
+{
+public:
+  Manager() = default;
+
+  Manager(const Manager&) = delete;
+  Manager& operator=(const Manager&) = delete;
+
+  Manager(Manager&&) = default;
+  Manager& operator=(Manager&&) = default;
+
+  virtual ~Manager() = default;
+
+  /**
+   * Dummy method
+   */
+  int GetNumber() const;
+
+  /**
+   * @brief Creates a new texture
+   */
+  Texture CreateTeture();
+};
+
+} // namespace Graphics
+} // namespace Dali
+
+#endif // DALI_GRAPHICS_TEXTURE_H
index 8cd9021..d821cf0 100644 (file)
@@ -63,6 +63,8 @@
 #include <dali/internal/render/queue/render-queue.h>
 #include <dali/internal/render/shaders/scene-graph-shader.h>
 
+#include <dali/graphics/graphics-manager.h>
+
 // Un-comment to enable node tree debug logging
 //#define NODE_TREE_LOGGING 1
 
@@ -288,6 +290,10 @@ UpdateManager::UpdateManager( NotificationManager& notificationManager,
                     mSceneGraphBuffers,
                     renderTaskProcessor );
 
+
+  Dali::Graphics::Manager gfxManager;
+
+  DALI_LOG_ERROR("Created graphics manager! %d\n", gfxManager.GetNumber());
 }
 
 UpdateManager::~UpdateManager()