mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-11 15:12:08 +00:00
renderer/canvas: clean up code
pimpl is not used at all.
This commit is contained in:
parent
4c546f843f
commit
784ff30008
3 changed files with 7 additions and 5 deletions
|
@ -45,15 +45,14 @@ struct GlCanvas::Impl
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
#ifdef THORVG_GL_RASTER_SUPPORT
|
#ifdef THORVG_GL_RASTER_SUPPORT
|
||||||
GlCanvas::GlCanvas() : Canvas(GlRenderer::gen()), pImpl(new Impl)
|
GlCanvas::GlCanvas() : Canvas(GlRenderer::gen()), pImpl(nullptr)
|
||||||
#else
|
#else
|
||||||
GlCanvas::GlCanvas() : Canvas(nullptr), pImpl(new Impl)
|
GlCanvas::GlCanvas() : Canvas(nullptr), pImpl(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GlCanvas::~GlCanvas()
|
GlCanvas::~GlCanvas()
|
||||||
{
|
{
|
||||||
delete(pImpl);
|
delete(pImpl);
|
||||||
|
|
|
@ -46,9 +46,9 @@ struct SwCanvas::Impl
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
#ifdef THORVG_SW_RASTER_SUPPORT
|
#ifdef THORVG_SW_RASTER_SUPPORT
|
||||||
SwCanvas::SwCanvas() : Canvas(SwRenderer::gen()), pImpl(new Impl)
|
SwCanvas::SwCanvas() : Canvas(SwRenderer::gen()), pImpl(nullptr)
|
||||||
#else
|
#else
|
||||||
SwCanvas::SwCanvas() : Canvas(nullptr), pImpl(new Impl)
|
SwCanvas::SwCanvas() : Canvas(nullptr), pImpl(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,11 +47,13 @@ WgCanvas::WgCanvas() : Canvas(nullptr), pImpl(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WgCanvas::~WgCanvas()
|
WgCanvas::~WgCanvas()
|
||||||
{
|
{
|
||||||
delete pImpl;
|
delete pImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Result WgCanvas::target(void* instance, void* surface, uint32_t w, uint32_t h) noexcept
|
Result WgCanvas::target(void* instance, void* surface, uint32_t w, uint32_t h) noexcept
|
||||||
{
|
{
|
||||||
#ifdef THORVG_WG_RASTER_SUPPORT
|
#ifdef THORVG_WG_RASTER_SUPPORT
|
||||||
|
@ -75,6 +77,7 @@ Result WgCanvas::target(void* instance, void* surface, uint32_t w, uint32_t h) n
|
||||||
return Result::NonSupport;
|
return Result::NonSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unique_ptr<WgCanvas> WgCanvas::gen() noexcept
|
unique_ptr<WgCanvas> WgCanvas::gen() noexcept
|
||||||
{
|
{
|
||||||
#ifdef THORVG_WG_RASTER_SUPPORT
|
#ifdef THORVG_WG_RASTER_SUPPORT
|
||||||
|
|
Loading…
Add table
Reference in a new issue