replace backend class names.
authorHermet Park <chuneon.park@samsung.com>
Sat, 18 Apr 2020 03:43:30 +0000 (12:43 +0900)
committerHermet Park <chuneon.park@samsung.com>
Sat, 18 Apr 2020 03:44:40 +0000 (12:44 +0900)
SwRaster to SwEngine
GlRaster to GlEngine

Change-Id: I3cf70e168b78c64754807a62c221e13c11b95c35

src/lib/gl_engine/meson.build
src/lib/gl_engine/tvgGlEngine.cpp [moved from src/lib/gl_engine/tvgGlRaster.cpp with 75% similarity]
src/lib/gl_engine/tvgGlEngine.h [moved from src/lib/gl_engine/tvgGlRaster.h with 81% similarity]
src/lib/sw_engine/meson.build
src/lib/sw_engine/tvgSwEngine.cpp [moved from src/lib/sw_engine/tvgSwRaster.cpp with 84% similarity]
src/lib/sw_engine/tvgSwEngine.h [moved from src/lib/sw_engine/tvgSwRaster.h with 81% similarity]
src/lib/tvgEngine.cpp
src/lib/tvgGlCanvas.cpp
src/lib/tvgSwCanvas.cpp

index 2c3fe06..117149a 100644 (file)
@@ -1,6 +1,6 @@
 source_file = [
-   'tvgGlRaster.h',
-   'tvgGlRaster.cpp',
+   'tvgGlEngine.h',
+   'tvgGlEngine.cpp',
 ]
 
 glraster_dep = declare_dependency(
similarity index 75%
rename from src/lib/gl_engine/tvgGlRaster.cpp
rename to src/lib/gl_engine/tvgGlEngine.cpp
index 50ed465..9280e34 100644 (file)
  *  limitations under the License.
  *
  */
-#ifndef _TVG_GL_RASTER_CPP_
-#define _TVG_GL_RASTER_CPP_
+#ifndef _TVG_GL_ENGINE_CPP_
+#define _TVG_GL_ENGINE_CPP_
 
 #include "tvgCommon.h"
-#include "tvgGlRaster.h"
+#include "tvgGlEngine.h"
 
 
-static GlRaster* pInst = nullptr;
+static GlEngine* pInst = nullptr;
 
 struct GlShape
 {
@@ -29,7 +29,7 @@ struct GlShape
 };
 
 
-void* GlRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+void* GlEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
 {
     //prepare shape data
     GlShape* sdata = static_cast<GlShape*>(data);
@@ -42,31 +42,31 @@ void* GlRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
 }
 
 
-int GlRaster::init()
+int GlEngine::init()
 {
     if (pInst) return -1;
-    pInst = new GlRaster();
+    pInst = new GlEngine();
     assert(pInst);
 
     return 0;
 }
 
 
-int GlRaster::term()
+int GlEngine::term()
 {
     if (!pInst) return -1;
-    cout << "GlRaster(" << pInst << ") destroyed!" << endl;
+    cout << "GlEngine(" << pInst << ") destroyed!" << endl;
     delete(pInst);
     pInst = nullptr;
     return 0;
 }
 
 
-GlRaster* GlRaster::inst()
+GlEngine* GlEngine::inst()
 {
     assert(pInst);
     return pInst;
 }
 
 
-#endif /* _TVG_GL_RASTER_CPP_ */
+#endif /* _TVG_GL_ENGINE_CPP_ */
similarity index 81%
rename from src/lib/gl_engine/tvgGlRaster.h
rename to src/lib/gl_engine/tvgGlEngine.h
index 08f750c..bad5214 100644 (file)
  *  limitations under the License.
  *
  */
-#ifndef _TVG_GL_RASTER_H_
-#define _TVG_GL_RASTER_H_
+#ifndef _TVG_GL_ENGINE_H_
+#define _TVG_GL_ENGINE_H_
 
 namespace tvg
 {
 
-class GlRaster : public RasterMethod
+class GlEngine : public RasterMethod
 {
 public:
     void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
-    static GlRaster* inst();
+    static GlEngine* inst();
     static int init();
     static int term();
 
 private:
-    GlRaster(){};
-    ~GlRaster(){};
+    GlEngine(){};
+    ~GlEngine(){};
 };
 
 }
 
-#endif /* _TVG_GL_RASTER_H_ */
+#endif /* _TVG_GL_ENGINE_H_ */
index 4937d59..a1bb0e0 100644 (file)
@@ -1,7 +1,7 @@
 source_file = [
    'tvgSwCommon.h',
-   'tvgSwRaster.h',
-   'tvgSwRaster.cpp',
+   'tvgSwEngine.h',
+   'tvgSwEngine.cpp',
    'tvgSwShape.cpp',
    'tvgSwRle.cpp',
 ]
similarity index 84%
rename from src/lib/sw_engine/tvgSwRaster.cpp
rename to src/lib/sw_engine/tvgSwEngine.cpp
index a7d2928..a6ae3e7 100644 (file)
  *  limitations under the License.
  *
  */
-#ifndef _TVG_SW_RASTER_CPP_
-#define _TVG_SW_RASTER_CPP_
+#ifndef _TVG_SW_ENGINE_CPP_
+#define _TVG_SW_ENGINE_CPP_
 
 #include "tvgSwCommon.h"
-#include "tvgSwRaster.h"
+#include "tvgSwEngine.h"
 
 /************************************************************************/
 /* Internal Class Implementation                                        */
 /************************************************************************/
 
-static SwRaster* pInst = nullptr;
+static SwEngine* pInst = nullptr;
 
 
 /************************************************************************/
 /* External Class Implementation                                        */
 /************************************************************************/
 
-void* SwRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+void* SwEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
 {
     //prepare shape data
     SwShape* sdata = static_cast<SwShape*>(data);
@@ -59,31 +59,31 @@ void* SwRaster::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
 }
 
 
-int SwRaster::init()
+int SwEngine::init()
 {
     if (pInst) return -1;
-    pInst = new SwRaster();
+    pInst = new SwEngine();
     assert(pInst);
 
     return 0;
 }
 
 
-int SwRaster::term()
+int SwEngine::term()
 {
     if (!pInst) return -1;
-    cout << "SwRaster(" << pInst << ") destroyed!" << endl;
+    cout << "SwEngine(" << pInst << ") destroyed!" << endl;
     delete(pInst);
     pInst = nullptr;
     return 0;
 }
 
 
-SwRaster* SwRaster::inst()
+SwEngine* SwEngine::inst()
 {
     assert(pInst);
     return pInst;
 }
 
 
-#endif /* _TVG_SW_RASTER_CPP_ */
+#endif /* _TVG_SW_ENGINE_CPP_ */
similarity index 81%
rename from src/lib/sw_engine/tvgSwRaster.h
rename to src/lib/sw_engine/tvgSwEngine.h
index c690be3..4185352 100644 (file)
  *  limitations under the License.
  *
  */
-#ifndef _TVG_SW_RASTER_H_
-#define _TVG_SW_RASTER_H_
+#ifndef _TVG_SW_ENGINE_H_
+#define _TVG_SW_ENGINE_H_
 
-class SwRaster : public RasterMethod
+class SwEngine : public RasterMethod
 {
 public:
     void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
-    static SwRaster* inst();
+    static SwEngine* inst();
     static int init();
     static int term();
 
 private:
-    SwRaster(){};
-    ~SwRaster(){};
+    SwEngine(){};
+    ~SwEngine(){};
 };
 
-#endif /* _TVG_SW_RASTER_H_ */
+#endif /* _TVG_SW_ENGINE_H_ */
index 5f8f533..d99ee2d 100644 (file)
@@ -18,8 +18,8 @@
 #define _TVG_ENGINE_CPP_
 
 #include "tvgCommon.h"
-#include "tvgSwRaster.h"
-#include "tvgGlRaster.h"
+#include "tvgSwEngine.h"
+#include "tvgGlEngine.h"
 
 /************************************************************************/
 /* Internal Class Implementation                                        */
@@ -35,8 +35,8 @@ int Engine::init() noexcept
     //TODO: Initialize Raster engines by configuration.
 
     int ret = 0;
-    ret |= SwRaster::init();
-    ret |= GlRaster::init();
+    ret |= SwEngine::init();
+    ret |= GlEngine::init();
 
     return ret;
 }
@@ -45,8 +45,8 @@ int Engine::init() noexcept
 int Engine::term() noexcept
 {
     int ret = 0;
-    ret |= SwRaster::term();
-    ret |= GlRaster::term();
+    ret |= SwEngine::term();
+    ret |= GlEngine::term();
 
     return ret;
 }
index 66f5448..7fb9a28 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "tvgCommon.h"
 #include "tvgCanvasBase.h"
-#include "tvgGlRaster.h"
+#include "tvgGlEngine.h"
 
 /************************************************************************/
 /* Internal Class Implementation                                        */
@@ -27,7 +27,7 @@
 
 struct GlCanvas::Impl : CanvasBase
 {
-    Impl() : CanvasBase(GlRaster::inst()) {}
+    Impl() : CanvasBase(GlEngine::inst()) {}
 };
 
 
index 82da453..995dac6 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "tvgCommon.h"
 #include "tvgCanvasBase.h"
-#include "tvgSwRaster.h"
+#include "tvgSwEngine.h"
 
 
 /************************************************************************/
@@ -32,7 +32,7 @@ struct SwCanvas::Impl : CanvasBase
     int stride = 0;
     int height = 0;
 
-    Impl() : CanvasBase(SwRaster::inst()) {}
+    Impl() : CanvasBase(SwEngine::inst()) {}
 };