mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
common initializer: replace engine class with intializer
This initializer will take over the global environments of tvg engines. Change-Id: I7b99973dafaea57ddd3134800bd442ef4dc319ae
This commit is contained in:
parent
fb208defed
commit
f627679882
22 changed files with 102 additions and 96 deletions
|
@ -69,7 +69,7 @@ enum class TVG_EXPORT PathCommand { Close = 0, MoveTo, LineTo, CubicTo };
|
||||||
enum class TVG_EXPORT StrokeCap { Square = 0, Round, Butt };
|
enum class TVG_EXPORT StrokeCap { Square = 0, Round, Butt };
|
||||||
enum class TVG_EXPORT StrokeJoin { Bevel = 0, Round, Miter };
|
enum class TVG_EXPORT StrokeJoin { Bevel = 0, Round, Miter };
|
||||||
enum class TVG_EXPORT FillSpread { Pad = 0, Reflect, Repeat };
|
enum class TVG_EXPORT FillSpread { Pad = 0, Reflect, Repeat };
|
||||||
|
enum class TVG_EXPORT CanvasEngine { Sw = 0, Gl };
|
||||||
|
|
||||||
struct Point
|
struct Point
|
||||||
{
|
{
|
||||||
|
@ -130,6 +130,34 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class Canvas
|
||||||
|
*
|
||||||
|
* @ingroup TizenVG
|
||||||
|
*
|
||||||
|
* @brief description...
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class TVG_EXPORT Canvas
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Canvas(RenderMethod*);
|
||||||
|
virtual ~Canvas();
|
||||||
|
|
||||||
|
Result reserve(uint32_t n) noexcept;
|
||||||
|
virtual Result push(std::unique_ptr<Paint> paint) noexcept;
|
||||||
|
virtual Result clear() noexcept;
|
||||||
|
virtual Result update() noexcept;
|
||||||
|
virtual Result update(Paint* paint) noexcept;
|
||||||
|
virtual Result draw(bool async = true) noexcept;
|
||||||
|
virtual Result sync() = 0;
|
||||||
|
|
||||||
|
_TVG_DECLARE_ACCESSOR(Scene);
|
||||||
|
_TVG_DECLARE_PRIVATE(Canvas);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class LinearGradient
|
* @class LinearGradient
|
||||||
*
|
*
|
||||||
|
@ -174,32 +202,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @class Canvas
|
|
||||||
*
|
|
||||||
* @ingroup TizenVG
|
|
||||||
*
|
|
||||||
* @brief description...
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class TVG_EXPORT Canvas
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Canvas(RenderMethod*);
|
|
||||||
virtual ~Canvas();
|
|
||||||
|
|
||||||
Result reserve(uint32_t n) noexcept;
|
|
||||||
virtual Result push(std::unique_ptr<Paint> paint) noexcept;
|
|
||||||
virtual Result clear() noexcept;
|
|
||||||
virtual Result update() noexcept;
|
|
||||||
virtual Result update(Paint* paint) noexcept;
|
|
||||||
virtual Result draw(bool async = true) noexcept;
|
|
||||||
virtual Result sync() = 0;
|
|
||||||
|
|
||||||
_TVG_DECLARE_ACCESSOR(Scene);
|
|
||||||
_TVG_DECLARE_PRIVATE(Canvas);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Shape
|
* @class Shape
|
||||||
|
@ -277,7 +279,7 @@ class TVG_EXPORT Scene final : public Paint
|
||||||
public:
|
public:
|
||||||
~Scene();
|
~Scene();
|
||||||
|
|
||||||
Result push(std::unique_ptr<Paint> shape) noexcept;
|
Result push(std::unique_ptr<Paint> paint) noexcept;
|
||||||
Result reserve(uint32_t size) noexcept;
|
Result reserve(uint32_t size) noexcept;
|
||||||
|
|
||||||
Result rotate(float degree) noexcept override;
|
Result rotate(float degree) noexcept override;
|
||||||
|
@ -347,9 +349,10 @@ public:
|
||||||
* @brief description...
|
* @brief description...
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class TVG_EXPORT Engine final
|
class TVG_EXPORT Initializer final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ...
|
* @brief ...
|
||||||
*
|
*
|
||||||
|
@ -361,10 +364,10 @@ public:
|
||||||
*
|
*
|
||||||
* @see ...
|
* @see ...
|
||||||
*/
|
*/
|
||||||
static Result init() noexcept;
|
static Result init(CanvasEngine engine) noexcept;
|
||||||
static Result term() noexcept;
|
static Result term(CanvasEngine engine) noexcept;
|
||||||
|
|
||||||
_TVG_DISABLE_CTOR(Engine);
|
_TVG_DISABLE_CTOR(Initializer);
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace
|
} //namespace
|
||||||
|
|
|
@ -9,9 +9,9 @@ source_file = [
|
||||||
'tvgShapePath.h',
|
'tvgShapePath.h',
|
||||||
'tvgShapeImpl.h',
|
'tvgShapeImpl.h',
|
||||||
'tvgCanvas.cpp',
|
'tvgCanvas.cpp',
|
||||||
'tvgEngine.cpp',
|
|
||||||
'tvgFill.cpp',
|
'tvgFill.cpp',
|
||||||
'tvgGlCanvas.cpp',
|
'tvgGlCanvas.cpp',
|
||||||
|
'tvgInitializer.cpp',
|
||||||
'tvgLinearGradient.cpp',
|
'tvgLinearGradient.cpp',
|
||||||
'tvgRadialGradient.cpp',
|
'tvgRadialGradient.cpp',
|
||||||
'tvgScene.cpp',
|
'tvgScene.cpp',
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef _TVG_ENGINE_CPP_
|
#ifndef _TVG_INITIALIZER_CPP_
|
||||||
#define _TVG_ENGINE_CPP_
|
#define _TVG_INITIALIZER_CPP_
|
||||||
|
|
||||||
#include "tvgCommon.h"
|
#include "tvgCommon.h"
|
||||||
#include "tvgSwRenderer.h"
|
#include "tvgSwRenderer.h"
|
||||||
|
@ -24,39 +24,42 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* Internal Class Implementation */
|
/* Internal Class Implementation */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
static bool initialized = false;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* External Class Implementation */
|
/* External Class Implementation */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
Result Engine::init() noexcept
|
Result Initializer::init(CanvasEngine engine) noexcept
|
||||||
{
|
{
|
||||||
if (initialized) return Result::InsufficientCondition;
|
if (engine == CanvasEngine::Sw) {
|
||||||
|
if (!SwRenderer::init()) return Result::InsufficientCondition;
|
||||||
|
} else if (engine == CanvasEngine::Gl) {
|
||||||
|
if (!GlRenderer::init()) return Result::InsufficientCondition;
|
||||||
|
} else {
|
||||||
|
return Result::InvalidArguments;
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: Initialize Raster engines by configuration.
|
//TODO: check modules then enable them
|
||||||
SwRenderer::init();
|
//1. TVG
|
||||||
GlRenderer::init();
|
//2. SVG
|
||||||
|
|
||||||
initialized = true;
|
|
||||||
|
|
||||||
return Result::Success;
|
return Result::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Result Engine::term() noexcept
|
Result Initializer::term(CanvasEngine engine) noexcept
|
||||||
{
|
{
|
||||||
if (!initialized) return Result::InsufficientCondition;
|
//TODO: deinitialize modules
|
||||||
|
|
||||||
//TODO: Terminate only allowed engines.
|
if (engine == CanvasEngine::Sw) {
|
||||||
SwRenderer::term();
|
if (!SwRenderer::term()) return Result::InsufficientCondition;
|
||||||
GlRenderer::term();
|
} else if (engine == CanvasEngine::Gl) {
|
||||||
|
if (!GlRenderer::term()) return Result::InsufficientCondition;
|
||||||
initialized = false;
|
} else {
|
||||||
|
return Result::InvalidArguments;
|
||||||
|
}
|
||||||
|
|
||||||
return Result::Success;
|
return Result::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _TVG_ENGINE_CPP_ */
|
#endif /* _TVG_INITIALIZER_CPP_ */
|
|
@ -136,28 +136,28 @@ struct RenderInitializer
|
||||||
uint32_t refCnt = 0;
|
uint32_t refCnt = 0;
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
|
|
||||||
static int init(RenderInitializer& renderInit, RenderMethod* engine)
|
static bool init(RenderInitializer& renderInit, RenderMethod* engine)
|
||||||
{
|
{
|
||||||
assert(engine);
|
assert(engine);
|
||||||
if (renderInit.pInst || renderInit.refCnt > 0) return -1;
|
if (renderInit.pInst || renderInit.refCnt > 0) return false;
|
||||||
renderInit.pInst = engine;
|
renderInit.pInst = engine;
|
||||||
renderInit.refCnt = 0;
|
renderInit.refCnt = 0;
|
||||||
renderInit.initialized = true;
|
renderInit.initialized = true;
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int term(RenderInitializer& renderInit)
|
static bool term(RenderInitializer& renderInit)
|
||||||
{
|
{
|
||||||
if (!renderInit.pInst || !renderInit.initialized) return -1;
|
if (!renderInit.pInst || !renderInit.initialized) return false;
|
||||||
|
|
||||||
renderInit.initialized = false;
|
renderInit.initialized = false;
|
||||||
|
|
||||||
//Still it's refered....
|
//Still it's refered....
|
||||||
if (renderInit.refCnt > 0) return 0;
|
if (renderInit.refCnt > 0) return true;
|
||||||
delete(renderInit.pInst);
|
delete(renderInit.pInst);
|
||||||
renderInit.pInst = nullptr;
|
renderInit.pInst = nullptr;
|
||||||
|
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t unref(RenderInitializer& renderInit)
|
static uint32_t unref(RenderInitializer& renderInit)
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -63,7 +63,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -53,7 +53,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -10,7 +10,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Composition Source Canvas
|
//Create a Composition Source Canvas
|
||||||
auto canvas1 = tvg::SwCanvas::gen(buffer, WIDTH, HEIGHT);
|
auto canvas1 = tvg::SwCanvas::gen(buffer, WIDTH, HEIGHT);
|
||||||
|
@ -31,5 +31,5 @@ int main(int argc, char **argv)
|
||||||
canvas2->sync();
|
canvas2->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ win_del(void *data, Evas_Object *o, void *ev)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
tvgtest();
|
tvgtest();
|
||||||
|
|
||||||
|
@ -100,5 +100,5 @@ int main(int argc, char **argv)
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen(buffer, WIDTH, HEIGHT);
|
auto canvas = tvg::SwCanvas::gen(buffer, WIDTH, HEIGHT);
|
||||||
|
@ -48,5 +48,5 @@ int main(int argc, char **argv)
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ win_del(void *data, Evas_Object *o, void *ev)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
tvgtest();
|
tvgtest();
|
||||||
|
|
||||||
|
@ -166,5 +166,5 @@ int main(int argc, char **argv)
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -81,7 +81,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -41,7 +41,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -56,7 +56,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -96,7 +96,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -81,7 +81,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -87,7 +87,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -129,7 +129,7 @@ win_del(void *data, Evas_Object *o, void *ev)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
tvgtest();
|
tvgtest();
|
||||||
|
|
||||||
|
@ -159,5 +159,5 @@ int main(int argc, char **argv)
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -35,7 +35,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -12,7 +12,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -80,7 +80,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -11,7 +11,7 @@ static uint32_t buffer[WIDTH * HEIGHT];
|
||||||
void tvgtest()
|
void tvgtest()
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
//Create a Canvas
|
//Create a Canvas
|
||||||
auto canvas = tvg::SwCanvas::gen();
|
auto canvas = tvg::SwCanvas::gen();
|
||||||
|
@ -116,7 +116,7 @@ void tvgtest()
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -98,7 +98,7 @@ win_del(void *data, Evas_Object *o, void *ev)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
tvgtest();
|
tvgtest();
|
||||||
|
|
||||||
|
@ -129,5 +129,5 @@ int main(int argc, char **argv)
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ win_del(void *data, Evas_Object *o, void *ev)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//Initialize TizenVG Engine
|
//Initialize TizenVG Engine
|
||||||
tvg::Engine::init();
|
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
||||||
|
|
||||||
tvgtest();
|
tvgtest();
|
||||||
|
|
||||||
|
@ -90,5 +90,5 @@ int main(int argc, char **argv)
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
|
|
||||||
//Terminate TizenVG Engine
|
//Terminate TizenVG Engine
|
||||||
tvg::Engine::term();
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue