rename class names.
authorHermet Park <chuneon.park@samsung.com>
Sat, 18 Apr 2020 13:59:27 +0000 (22:59 +0900)
committerHermet Park <chuneon.park@samsung.com>
Sat, 18 Apr 2020 14:00:44 +0000 (23:00 +0900)
RasterMethod -> RenderMethod
SwEngine -> SwRenderer
GlEngine -> GlRenderer

Change-Id: Ic2ded698e49c4373fe21fe31fa34baca01bf43a2

18 files changed:
inc/tizenvg.h
src/lib/gl_engine/meson.build
src/lib/gl_engine/tvgGlEngine.cpp [deleted file]
src/lib/gl_engine/tvgGlEngine.h [deleted file]
src/lib/gl_engine/tvgGlRenderer.cpp [new file with mode: 0644]
src/lib/gl_engine/tvgGlRenderer.h [new file with mode: 0644]
src/lib/sw_engine/meson.build
src/lib/sw_engine/tvgSwEngine.cpp [deleted file]
src/lib/sw_engine/tvgSwEngine.h [deleted file]
src/lib/sw_engine/tvgSwRenderer.cpp [new file with mode: 0644]
src/lib/sw_engine/tvgSwRenderer.h [new file with mode: 0644]
src/lib/tvgCanvasBase.h
src/lib/tvgCommon.h
src/lib/tvgEngine.cpp
src/lib/tvgGlCanvas.cpp
src/lib/tvgSceneNode.cpp
src/lib/tvgShapeNode.cpp
src/lib/tvgSwCanvas.cpp

index e9f49d376d372b3c7ae7ea421bd273d84396ecdf..dd125b521be68489a957fbc9efd376d53a3d385f 100644 (file)
@@ -52,7 +52,7 @@ namespace tvg
 
 enum class TIZENVG_EXPORT PathCommand { Close, MoveTo, LineTo, CubicTo };
 
-class RasterMethod;
+class RenderMethod;
 
 struct Point
 {
@@ -73,8 +73,8 @@ class TIZENVG_EXPORT PaintNode
 {
 public:
     virtual ~PaintNode() {}
-    virtual int dispose(RasterMethod* engine) = 0;
-    virtual int update(RasterMethod* engine) = 0;
+    virtual int dispose(RenderMethod* engine) = 0;
+    virtual int update(RenderMethod* engine) = 0;
 };
 
 
@@ -91,8 +91,8 @@ class TIZENVG_EXPORT ShapeNode final : public PaintNode
 public:
     ~ShapeNode();
 
-    int dispose(RasterMethod* engine) noexcept override;
-    int update(RasterMethod* engine) noexcept override;
+    int dispose(RenderMethod* engine) noexcept override;
+    int update(RenderMethod* engine) noexcept override;
     int clear() noexcept;
 
     int appendRect(float x, float y, float w, float h, float radius) noexcept;
@@ -123,8 +123,8 @@ class TIZENVG_EXPORT SceneNode final : public PaintNode
 public:
     ~SceneNode();
 
-    int dispose(RasterMethod* engine) noexcept override;
-    int update(RasterMethod* engine) noexcept override;
+    int dispose(RenderMethod* engine) noexcept override;
+    int update(RenderMethod* engine) noexcept override;
 
     int push(std::unique_ptr<ShapeNode> shape) noexcept;
 
@@ -153,7 +153,7 @@ public:
     int update() noexcept;
     int draw(bool async = true) noexcept;
     int sync() noexcept;
-    RasterMethod* engine() noexcept;
+    RenderMethod* engine() noexcept;
 
     int target(uint32_t* buffer, size_t stride, size_t height) noexcept;
 
@@ -183,7 +183,7 @@ public:
     int update() noexcept;
     int draw(bool async = true) noexcept { return 0; }
     int sync() noexcept { return 0; }
-    RasterMethod* engine() noexcept;
+    RenderMethod* engine() noexcept;
 
     static std::unique_ptr<GlCanvas> gen() noexcept;
 
index 117149a1ec6e2e2b547d5563ce5f84589fd5f800..13e7fefe75d570b59b17b013930ba1aeae030a4e 100644 (file)
@@ -1,6 +1,6 @@
 source_file = [
-   'tvgGlEngine.h',
-   'tvgGlEngine.cpp',
+   'tvgGlRenderer.h',
+   'tvgGlRenderer.cpp',
 ]
 
 glraster_dep = declare_dependency(
diff --git a/src/lib/gl_engine/tvgGlEngine.cpp b/src/lib/gl_engine/tvgGlEngine.cpp
deleted file mode 100644 (file)
index 65a5ce3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *  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.
- *
- */
-#ifndef _TVG_GL_ENGINE_CPP_
-#define _TVG_GL_ENGINE_CPP_
-
-#include "tvgCommon.h"
-#include "tvgGlEngine.h"
-
-/************************************************************************/
-/* Internal Class Implementation                                        */
-/************************************************************************/
-
-static RasterMethodInit engineInit;
-
-struct GlShape
-{
-    //TODO:
-};
-
-/************************************************************************/
-/* External Class Implementation                                        */
-/************************************************************************/
-
-void* GlEngine::dispose(const ShapeNode& shape, void *data)
-{
-    GlShape* sdata = static_cast<GlShape*>(data);
-    if (!sdata) return nullptr;
-    free(sdata);
-    return nullptr;
-}
-
-
-void* GlEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
-{
-    //prepare shape data
-    GlShape* sdata = static_cast<GlShape*>(data);
-    if (!sdata) {
-        sdata = static_cast<GlShape*>(calloc(1, sizeof(GlShape)));
-        assert(sdata);
-    }
-    return sdata;
-}
-
-
-int GlEngine::init()
-{
-    return RasterMethodInit::init(engineInit, new GlEngine);
-}
-
-
-int GlEngine::term()
-{
-    return RasterMethodInit::term(engineInit);
-}
-
-
-size_t GlEngine::unref()
-{
-    return RasterMethodInit::unref(engineInit);
-}
-
-
-size_t GlEngine::ref()
-{
-    return RasterMethodInit::ref(engineInit);
-}
-
-
-GlEngine* GlEngine::inst()
-{
-    return dynamic_cast<GlEngine*>(RasterMethodInit::inst(engineInit));
-}
-
-
-#endif /* _TVG_GL_ENGINE_CPP_ */
diff --git a/src/lib/gl_engine/tvgGlEngine.h b/src/lib/gl_engine/tvgGlEngine.h
deleted file mode 100644 (file)
index ebd1fd5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *  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.
- *
- */
-#ifndef _TVG_GL_ENGINE_H_
-#define _TVG_GL_ENGINE_H_
-
-namespace tvg
-{
-
-class GlEngine : public RasterMethod
-{
-public:
-    void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
-    void* dispose(const ShapeNode& shape, void *data) override;
-    size_t ref() override;
-    size_t unref() override;
-
-    static GlEngine* inst();
-    static int init();
-    static int term();
-
-private:
-    GlEngine(){};
-    ~GlEngine(){};
-};
-
-}
-
-#endif /* _TVG_GL_ENGINE_H_ */
diff --git a/src/lib/gl_engine/tvgGlRenderer.cpp b/src/lib/gl_engine/tvgGlRenderer.cpp
new file mode 100644 (file)
index 0000000..92f00dd
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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.
+ *
+ */
+#ifndef _TVG_GL_RENDERER_CPP_
+#define _TVG_GL_RENDERER_CPP_
+
+#include "tvgCommon.h"
+#include "tvgGlRenderer.h"
+
+/************************************************************************/
+/* Internal Class Implementation                                        */
+/************************************************************************/
+
+static RenderMethodInit engineInit;
+
+struct GlShape
+{
+    //TODO:
+};
+
+/************************************************************************/
+/* External Class Implementation                                        */
+/************************************************************************/
+
+void* GlRenderer::dispose(const ShapeNode& shape, void *data)
+{
+    GlShape* sdata = static_cast<GlShape*>(data);
+    if (!sdata) return nullptr;
+    free(sdata);
+    return nullptr;
+}
+
+
+void* GlRenderer::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+{
+    //prepare shape data
+    GlShape* sdata = static_cast<GlShape*>(data);
+    if (!sdata) {
+        sdata = static_cast<GlShape*>(calloc(1, sizeof(GlShape)));
+        assert(sdata);
+    }
+    return sdata;
+}
+
+
+int GlRenderer::init()
+{
+    return RenderMethodInit::init(engineInit, new GlRenderer);
+}
+
+
+int GlRenderer::term()
+{
+    return RenderMethodInit::term(engineInit);
+}
+
+
+size_t GlRenderer::unref()
+{
+    return RenderMethodInit::unref(engineInit);
+}
+
+
+size_t GlRenderer::ref()
+{
+    return RenderMethodInit::ref(engineInit);
+}
+
+
+GlRenderer* GlRenderer::inst()
+{
+    return dynamic_cast<GlRenderer*>(RenderMethodInit::inst(engineInit));
+}
+
+
+#endif /* _TVG_GL_RENDERER_CPP_ */
diff --git a/src/lib/gl_engine/tvgGlRenderer.h b/src/lib/gl_engine/tvgGlRenderer.h
new file mode 100644 (file)
index 0000000..534969a
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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.
+ *
+ */
+#ifndef _TVG_GL_RENDERER_H_
+#define _TVG_GL_RENDERER_H_
+
+namespace tvg
+{
+
+class GlRenderer : public RenderMethod
+{
+public:
+    void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
+    void* dispose(const ShapeNode& shape, void *data) override;
+    size_t ref() override;
+    size_t unref() override;
+
+    static GlRenderer* inst();
+    static int init();
+    static int term();
+
+private:
+    GlRenderer(){};
+    ~GlRenderer(){};
+};
+
+}
+
+#endif /* _TVG_GL_RENDERER_H_ */
index a1bb0e0a46302bac4a3215bc58f04b53b69d7b5e..4edd4895b3fe999e011219fc5e958703afc18870 100644 (file)
@@ -1,7 +1,7 @@
 source_file = [
    'tvgSwCommon.h',
-   'tvgSwEngine.h',
-   'tvgSwEngine.cpp',
+   'tvgSwRenderer.h',
+   'tvgSwRenderer.cpp',
    'tvgSwShape.cpp',
    'tvgSwRle.cpp',
 ]
diff --git a/src/lib/sw_engine/tvgSwEngine.cpp b/src/lib/sw_engine/tvgSwEngine.cpp
deleted file mode 100644 (file)
index 683bffa..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *  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.
- *
- */
-#ifndef _TVG_SW_ENGINE_CPP_
-#define _TVG_SW_ENGINE_CPP_
-
-#include "tvgSwCommon.h"
-#include "tvgSwEngine.h"
-
-/************************************************************************/
-/* Internal Class Implementation                                        */
-/************************************************************************/
-
-static RasterMethodInit engineInit;
-
-
-/************************************************************************/
-/* External Class Implementation                                        */
-/************************************************************************/
-
-void* SwEngine::dispose(const ShapeNode& shape, void *data)
-{
-    SwShape* sdata = static_cast<SwShape*>(data);
-    if (!sdata) return nullptr;
-    shapeReset(*sdata);
-    free(sdata);
-    return nullptr;
-}
-
-void* SwEngine::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
-{
-    //prepare shape data
-    SwShape* sdata = static_cast<SwShape*>(data);
-    if (!sdata) {
-        sdata = static_cast<SwShape*>(calloc(1, sizeof(SwShape)));
-        assert(sdata);
-    }
-
-    if (flags == UpdateFlag::None) return nullptr;
-
-    //invisible?
-    size_t alpha;
-    shape.fill(nullptr, nullptr, nullptr, &alpha);
-    if (alpha == 0) return sdata;
-
-    if (flags & UpdateFlag::Path) {
-        shapeReset(*sdata);
-        if (!shapeGenOutline(shape, *sdata)) return sdata;
-        //TODO: From below sequence starts threading?
-        if (!shapeTransformOutline(shape, *sdata)) return sdata;
-        if (!shapeGenRle(shape, *sdata)) return sdata;
-    }
-
-    return sdata;
-}
-
-
-int SwEngine::init()
-{
-    return RasterMethodInit::init(engineInit, new SwEngine);
-}
-
-
-int SwEngine::term()
-{
-    return RasterMethodInit::term(engineInit);
-}
-
-
-size_t SwEngine::unref()
-{
-    return RasterMethodInit::unref(engineInit);
-}
-
-
-size_t SwEngine::ref()
-{
-    return RasterMethodInit::ref(engineInit);
-}
-
-
-SwEngine* SwEngine::inst()
-{
-    return dynamic_cast<SwEngine*>(RasterMethodInit::inst(engineInit));
-}
-
-
-#endif /* _TVG_SW_ENGINE_CPP_ */
diff --git a/src/lib/sw_engine/tvgSwEngine.h b/src/lib/sw_engine/tvgSwEngine.h
deleted file mode 100644 (file)
index dd2d401..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *  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.
- *
- */
-#ifndef _TVG_SW_ENGINE_H_
-#define _TVG_SW_ENGINE_H_
-
-class SwEngine : public RasterMethod
-{
-public:
-    void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
-    void* dispose(const ShapeNode& shape, void *data) override;
-    size_t ref() override;
-    size_t unref() override;
-
-    static SwEngine* inst();
-    static int init();
-    static int term();
-
-private:
-    SwEngine(){};
-    ~SwEngine(){};
-};
-
-#endif /* _TVG_SW_ENGINE_H_ */
diff --git a/src/lib/sw_engine/tvgSwRenderer.cpp b/src/lib/sw_engine/tvgSwRenderer.cpp
new file mode 100644 (file)
index 0000000..a4f126d
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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.
+ *
+ */
+#ifndef _TVG_SW_RENDERER_CPP_
+#define _TVG_SW_RENDERER_CPP_
+
+#include "tvgSwCommon.h"
+#include "tvgSwRenderer.h"
+
+/************************************************************************/
+/* Internal Class Implementation                                        */
+/************************************************************************/
+
+static RenderMethodInit engineInit;
+
+
+/************************************************************************/
+/* External Class Implementation                                        */
+/************************************************************************/
+
+void* SwRenderer::dispose(const ShapeNode& shape, void *data)
+{
+    SwShape* sdata = static_cast<SwShape*>(data);
+    if (!sdata) return nullptr;
+    shapeReset(*sdata);
+    free(sdata);
+    return nullptr;
+}
+
+void* SwRenderer::prepare(const ShapeNode& shape, void* data, UpdateFlag flags)
+{
+    //prepare shape data
+    SwShape* sdata = static_cast<SwShape*>(data);
+    if (!sdata) {
+        sdata = static_cast<SwShape*>(calloc(1, sizeof(SwShape)));
+        assert(sdata);
+    }
+
+    if (flags == UpdateFlag::None) return nullptr;
+
+    //invisible?
+    size_t alpha;
+    shape.fill(nullptr, nullptr, nullptr, &alpha);
+    if (alpha == 0) return sdata;
+
+    if (flags & UpdateFlag::Path) {
+        shapeReset(*sdata);
+        if (!shapeGenOutline(shape, *sdata)) return sdata;
+        //TODO: From below sequence starts threading?
+        if (!shapeTransformOutline(shape, *sdata)) return sdata;
+        if (!shapeGenRle(shape, *sdata)) return sdata;
+    }
+
+    return sdata;
+}
+
+
+int SwRenderer::init()
+{
+    return RenderMethodInit::init(engineInit, new SwRenderer);
+}
+
+
+int SwRenderer::term()
+{
+    return RenderMethodInit::term(engineInit);
+}
+
+
+size_t SwRenderer::unref()
+{
+    return RenderMethodInit::unref(engineInit);
+}
+
+
+size_t SwRenderer::ref()
+{
+    return RenderMethodInit::ref(engineInit);
+}
+
+
+SwRenderer* SwRenderer::inst()
+{
+    return dynamic_cast<SwRenderer*>(RenderMethodInit::inst(engineInit));
+}
+
+
+#endif /* _TVG_SW_RENDERER_CPP_ */
diff --git a/src/lib/sw_engine/tvgSwRenderer.h b/src/lib/sw_engine/tvgSwRenderer.h
new file mode 100644 (file)
index 0000000..13f4f27
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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.
+ *
+ */
+#ifndef _TVG_SW_RENDERER_H_
+#define _TVG_SW_RENDERER_H_
+
+class SwRenderer : public RenderMethod
+{
+public:
+    void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) override;
+    void* dispose(const ShapeNode& shape, void *data) override;
+    size_t ref() override;
+    size_t unref() override;
+
+    static SwRenderer* inst();
+    static int init();
+    static int term();
+
+private:
+    SwRenderer(){};
+    ~SwRenderer(){};
+};
+
+#endif /* _TVG_SW_RENDERER_H_ */
index 3ec6c7ab176ee48c80bcc23452805183cbf9c540..89476ad6bbfa44e59ad32419b22c2aa4fa205158 100644 (file)
 struct CanvasBase
 {
     vector<PaintNode*> nodes;
-    RasterMethod*      raster;
+    RenderMethod*      renderer;
 
-    CanvasBase(RasterMethod *pRaster):raster(pRaster)
+    CanvasBase(RenderMethod *pRenderer):renderer(pRenderer)
     {
-        raster->ref();
+        renderer->ref();
     }
 
     ~CanvasBase()
     {
        clear();
-       raster->unref();
+       renderer->unref();
     }
 
     int reserve(size_t n)
@@ -49,7 +49,7 @@ struct CanvasBase
     int clear()
     {
         for (auto node : nodes) {
-            node->dispose(raster);
+            node->dispose(renderer);
             delete(node);
         }
         nodes.clear();
@@ -67,11 +67,11 @@ struct CanvasBase
         if (SceneNode *scene = dynamic_cast<SceneNode *>(node)) {
 
         } else if (ShapeNode *shape = dynamic_cast<ShapeNode *>(node)) {
-            return shape->update(raster);
+            return shape->update(renderer);
         }
 #else
         if (ShapeNode *shape = dynamic_cast<ShapeNode *>(node)) {
-            return shape->update(raster);
+            return shape->update(renderer);
         }
 #endif
         cout << "What type of PaintNode? = " << node << endl;
index fe2d8e2105b306f06c7b69f71d387b5f37754254..d7d1d4dad3aa069efb3090e38ce43384871918fb 100644 (file)
@@ -29,24 +29,24 @@ using namespace tvg;
 namespace tvg
 {
 
-class RasterMethod
+class RenderMethod
 {
 public:
     enum UpdateFlag { None = 0, Path = 1, Fill = 2, All = 3 };
-    virtual ~RasterMethod() {}
+    virtual ~RenderMethod() {}
     virtual void* prepare(const ShapeNode& shape, void* data, UpdateFlag flags) = 0;
     virtual void* dispose(const ShapeNode& shape, void *data) = 0;
     virtual size_t ref() = 0;
     virtual size_t unref() = 0;
 };
 
-struct RasterMethodInit
+struct RenderMethodInit
 {
-    RasterMethod* pInst = nullptr;
+    RenderMethod* pInst = nullptr;
     size_t refCnt = 0;
     bool initted = false;
 
-    static int init(RasterMethodInit& initter, RasterMethod* engine)
+    static int init(RenderMethodInit& initter, RenderMethod* engine)
     {
         assert(engine);
         if (initter.pInst || initter.refCnt > 0) return -1;
@@ -56,7 +56,7 @@ struct RasterMethodInit
         return 0;
     }
 
-    static int term(RasterMethodInit& initter)
+    static int term(RenderMethodInit& initter)
     {
         if (!initter.pInst || !initter.initted) return -1;
 
@@ -70,7 +70,7 @@ struct RasterMethodInit
         return 0;
     }
 
-    static size_t unref(RasterMethodInit& initter)
+    static size_t unref(RenderMethodInit& initter)
     {
         assert(initter.refCnt > 0);
         --initter.refCnt;
@@ -85,13 +85,13 @@ struct RasterMethodInit
         return initter.refCnt;
     }
 
-    static RasterMethod* inst(RasterMethodInit& initter)
+    static RenderMethod* inst(RenderMethodInit& initter)
     {
         assert(initter.pInst);
         return initter.pInst;
     }
 
-    static size_t ref(RasterMethodInit& initter)
+    static size_t ref(RenderMethodInit& initter)
     {
         return ++initter.refCnt;
     }
index d99ee2d26187d6e269524f5a94a7c1f94c500965..fa005dc06ebd30dacc0c0a6344aaa651b9f83f07 100644 (file)
@@ -18,8 +18,8 @@
 #define _TVG_ENGINE_CPP_
 
 #include "tvgCommon.h"
-#include "tvgSwEngine.h"
-#include "tvgGlEngine.h"
+#include "tvgSwRenderer.h"
+#include "tvgGlRenderer.h"
 
 /************************************************************************/
 /* Internal Class Implementation                                        */
@@ -35,8 +35,8 @@ int Engine::init() noexcept
     //TODO: Initialize Raster engines by configuration.
 
     int ret = 0;
-    ret |= SwEngine::init();
-    ret |= GlEngine::init();
+    ret |= SwRenderer::init();
+    ret |= GlRenderer::init();
 
     return ret;
 }
@@ -45,8 +45,8 @@ int Engine::init() noexcept
 int Engine::term() noexcept
 {
     int ret = 0;
-    ret |= SwEngine::term();
-    ret |= GlEngine::term();
+    ret |= SwRenderer::term();
+    ret |= GlRenderer::term();
 
     return ret;
 }
index 7fb9a283a33a37284dc1f59257dee9e66802dea1..619ea4b04988307f8f1fd0f2c23bf41b8de1a219 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "tvgCommon.h"
 #include "tvgCanvasBase.h"
-#include "tvgGlEngine.h"
+#include "tvgGlRenderer.h"
 
 /************************************************************************/
 /* Internal Class Implementation                                        */
@@ -27,7 +27,7 @@
 
 struct GlCanvas::Impl : CanvasBase
 {
-    Impl() : CanvasBase(GlEngine::inst()) {}
+    Impl() : CanvasBase(GlRenderer::inst()) {}
 };
 
 
@@ -76,11 +76,11 @@ int GlCanvas::update() noexcept
 }
 
 
-RasterMethod* GlCanvas::engine() noexcept
+RenderMethod* GlCanvas::engine() noexcept
 {
     auto impl = pImpl.get();
     assert(impl);
-    return impl->raster;
+    return impl->renderer;
 }
 
 #endif /* _TVG_GLCANVAS_CPP_ */
index 93a9b2110dd22a3df6aa2f47b80b40af7b61331c..9c7d11fe6fadc43ccfc21b85c40dcf5431e64860 100644 (file)
@@ -58,14 +58,14 @@ int SceneNode :: push(unique_ptr<ShapeNode> shape) noexcept
 }
 
 
-int SceneNode :: dispose(RasterMethod* engine) noexcept
+int SceneNode :: dispose(RenderMethod* engine) noexcept
 {
 
     return 0;
 }
 
 
-int SceneNode :: update(RasterMethod* engine) noexcept
+int SceneNode :: update(RenderMethod* engine) noexcept
 {
 
     return 0;
index f17021a29f68c35f6489132b705ba955fae8433a..74dae239e0d4831ab631494e2dc0ef5159fc9aa3 100644 (file)
@@ -84,7 +84,7 @@ unique_ptr<ShapeNode> ShapeNode::gen() noexcept
 }
 
 
-int ShapeNode :: dispose(RasterMethod* engine) noexcept
+int ShapeNode :: dispose(RenderMethod* engine) noexcept
 {
     auto impl = pImpl.get();
     assert(impl);
@@ -95,12 +95,12 @@ int ShapeNode :: dispose(RasterMethod* engine) noexcept
 }
 
 
-int ShapeNode :: update(RasterMethod* engine) noexcept
+int ShapeNode :: update(RenderMethod* engine) noexcept
 {
     auto impl = pImpl.get();
     assert(impl);
 
-    impl->edata = engine->prepare(*this, impl->edata, RasterMethod::UpdateFlag::All);
+    impl->edata = engine->prepare(*this, impl->edata, RenderMethod::UpdateFlag::All);
     if (impl->edata) return 0;
     return - 1;
 }
index e85275f4aba6af2ab3dc6b1405f58ad170463b8a..4d930a71f59da472f70ac1a3e4aca140bc89e60c 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "tvgCommon.h"
 #include "tvgCanvasBase.h"
-#include "tvgSwEngine.h"
+#include "tvgSwRenderer.h"
 
 
 /************************************************************************/
@@ -32,7 +32,7 @@ struct SwCanvas::Impl : CanvasBase
     int stride = 0;
     int height = 0;
 
-    Impl() : CanvasBase(SwEngine::inst()) {}
+    Impl() : CanvasBase(SwRenderer::inst()) {}
 };
 
 
@@ -111,11 +111,11 @@ int SwCanvas::update() noexcept
 }
 
 
-RasterMethod* SwCanvas::engine() noexcept
+RenderMethod* SwCanvas::engine() noexcept
 {
     auto impl = pImpl.get();
     assert(impl);
-    return impl->raster;
+    return impl->renderer;
 }
 
 #endif /* _TVG_SWCANVAS_CPP_ */