remove unnecessary condition.
implementation won't be included multiple times not like headers.
Thus this condition is unnecessary.
Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
-#ifndef _TVG_GL_RENDERER_CPP_
-#define _TVG_GL_RENDERER_CPP_
-
#include "tvgGlShaderSrc.h"
#include "tvgGlGpuBuffer.h"
#include "tvgGlGeometry.h"
geometry.draw(mVertexAttrLoc, primitiveIndex, flag);
geometry.disableVertex(mVertexAttrLoc);
-}
-
-#endif /* _TVG_GL_RENDERER_CPP_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_FILL_CPP_
-#define _TVG_SW_FILL_CPP_
-
#include "tvgSwCommon.h"
if (fill->ctable) free(fill->ctable);
free(fill);
-}
-
-#endif /* _TVG_SW_FILL_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_MATH_H_
-#define _TVG_SW_MATH_H_
-
#include "tvgSwCommon.h"
if (delta > SW_ANGLE_PI) delta -= SW_ANGLE_2PI;
return delta;
-}
-#endif /* _TVG_SW_MATH_H_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_RASTER_CPP_
-#define _TVG_SW_RASTER_CPP_
-
#include "tvgSwCommon.h"
/************************************************************************/
}
}
return true;
-}
-
-#endif /* _TVG_SW_RASTER_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_RENDERER_CPP_
-#define _TVG_SW_RENDERER_CPP_
-
#include "tvgSwCommon.h"
#include "tvgSwRenderer.h"
{
//We know renderer type, avoid dynamic_cast for performance.
return static_cast<SwRenderer*>(RenderInitializer::inst(renderInit));
-}
-
-#endif /* _TVG_SW_RENDERER_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_RLE_H_
-#define _TVG_SW_RLE_H_
-
#include <setjmp.h>
#include <limits.h>
#include <memory.h>
if (!rle) return;
if (rle->spans) free(rle->spans);
free(rle);
-}
-
-#endif /* _TVG_SW_RLE_H_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_SHAPE_H_
-#define _TVG_SW_SHAPE_H_
-
#include "tvgSwCommon.h"
/************************************************************************/
if (!shape->fill) return;
fillFree(shape->fill);
shape->fill = nullptr;
-}
-
-
-#endif /* _TVG_SW_SHAPE_H_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SW_STROKER_H_
-#define _TVG_SW_STROKER_H_
-
#include "tvgSwCommon.h"
_exportBorderOutline(*stroke, outline, 1); //right
return outline;
-}
-
-#endif /* _TVG_SW_STROKER_H_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_BEZIER_CPP_
-#define _TVG_BEZIER_CPP_
-
#include "tvgCommon.h"
bezSplitLeft(right, t, left);
}
-
-}
-
-#endif //_TVG_BEZIER_CPP_
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_CANVAS_CPP_
-#define _TVG_CANVAS_CPP_
-
#include "tvgCommon.h"
#include "tvgCanvasImpl.h"
if (IMPL->renderer->flush()) return Result::Success;
return Result::InsufficientCondition;
-}
-
-#endif /* _TVG_CANVAS_CPP_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_FILL_CPP_
-#define _TVG_FILL_CPP_
-
#include "tvgCommon.h"
FillSpread Fill::spread() const noexcept
{
return IMPL->spread;
-}
-
-#endif /* _TVG_FILL_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_GLCANVAS_CPP_
-#define _TVG_GLCANVAS_CPP_
-
#include "tvgCommon.h"
#include "tvgCanvasImpl.h"
return unique_ptr<GlCanvas>(new GlCanvas);
#endif
return nullptr;
-}
-
-
-#endif /* _TVG_GLCANVAS_CPP_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_INITIALIZER_CPP_
-#define _TVG_INITIALIZER_CPP_
-
#include "tvgCommon.h"
#include "tvgLoaderMgr.h"
uint32_t Initializer::threads() noexcept
{
return threadCnt;
-}
-
-#endif /* _TVG_INITIALIZER_CPP_ */
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_LINEAR_GRADIENT_CPP_
-#define _TVG_LINEAR_GRADIENT_CPP_
-
#include "tvgCommon.h"
/************************************************************************/
unique_ptr<LinearGradient> LinearGradient::gen() noexcept
{
return unique_ptr<LinearGradient>(new LinearGradient);
-}
-
-#endif /* _TVG_LINEAR_GRADIENT_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_LOADER_MGR_CPP_
-#define _TVG_LOADER_MGR_CPP_
-
#include "tvgCommon.h"
#ifdef THORVG_SVG_LOADER_SUPPORT
return unique_ptr<SvgLoader>(new SvgLoader);
#endif
return nullptr;
-}
-
-#endif //_TVG_LOADER_MGR_CPP_
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_PAINT_CPP_
-#define _TVG_PAINT_CPP_
-
#include "tvgCommon.h"
/************************************************************************/
{
if (IMPL->bounds(x, y, w, h)) return Result::Success;
return Result::InsufficientCondition;
-}
-
-#endif //_TVG_PAINT_CPP_
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_PICTURE_CPP_
-#define _TVG_PICTURE_CPP_
-
#include "tvgPictureImpl.h"
/************************************************************************/
{
if (IMPL->viewbox(x, y, w, h)) return Result::Success;
return Result::InsufficientCondition;
-}
-
-#endif /* _TVG_PICTURE_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_RADIAL_GRADIENT_CPP_
-#define _TVG_RADIAL_GRADIENT_CPP_
-
#include "tvgCommon.h"
/************************************************************************/
unique_ptr<RadialGradient> RadialGradient::gen() noexcept
{
return unique_ptr<RadialGradient>(new RadialGradient);
-}
-
-#endif /* _TVG_RADIAL_GRADIENT_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_RENDER_CPP_
-#define _TVG_RENDER_CPP_
-
#include "tvgCommon.h"
/************************************************************************/
m.e31 = lhs->m.e31 * rhs->m.e11 + lhs->m.e32 * rhs->m.e21 + lhs->m.e33 * rhs->m.e31;
m.e32 = lhs->m.e31 * rhs->m.e12 + lhs->m.e32 * rhs->m.e22 + lhs->m.e33 * rhs->m.e32;
m.e33 = lhs->m.e31 * rhs->m.e13 + lhs->m.e32 * rhs->m.e23 + lhs->m.e33 * rhs->m.e33;
-}
-
-#endif //_TVG_RENDER_CPP_
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SCENE_CPP_
-#define _TVG_SCENE_CPP_
-
#include "tvgSceneImpl.h"
/************************************************************************/
IMPL->paints.reserve(size);
return Result::Success;
-}
-
-#endif /* _TVG_SCENE_CPP_ */
\ No newline at end of file
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SHAPE_CPP_
-#define _TVG_SHAPE_CPP_
-
#include <limits>
#include "tvgShapeImpl.h"
if (!IMPL->stroke) return StrokeJoin::Bevel;
return IMPL->stroke->join;
-}
-
-
-#endif //_TVG_SHAPE_CPP_
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SWCANVAS_CPP_
-#define _TVG_SWCANVAS_CPP_
-
#include "tvgCommon.h"
#include "tvgCanvasImpl.h"
return unique_ptr<SwCanvas>(new SwCanvas);
#endif
return nullptr;
-}
-
-#endif /* _TVG_SWCANVAS_CPP_ */
+}
\ No newline at end of file
}
return nullptr;
-}
-
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef _TVG_SVG_LOADER_CPP_
-#define _TVG_SVG_LOADER_CPP_
-
#include <stddef.h>
#include <fstream>
#include "tvgSvgLoader.h"
unique_ptr<Scene> SvgLoader::data()
{
return move(root);
-}
-
-#endif //_TVG_SVG_LOADER_CPP_
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
-#ifndef __TVG_SVG_PATH_CPP_
-#define __TVG_SVG_PATH_CPP_
-
#include "tvgSvgPath.h"
if (curLocale) free(curLocale);
return make_tuple(cmds, pts);
-}
-
-#endif //__TVG_SVG_PATH_CPP_
+}
\ No newline at end of file
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
-#ifndef _TVG_SVG_SCENE_BUILDER_CPP_
-#define _TVG_SVG_SCENE_BUILDER_CPP_
-
-
#include "tvgSvgSceneBuilder.h"
unique_ptr<LinearGradient> _applyLinearGradientProperty(SvgStyleGradient* g, Shape* vg, float rx, float ry, float rw, float rh)
viewBox.h = node->node.doc.vh;
preserveAspect = node->node.doc.preserveAspect;
return _sceneBuildHelper(node, viewBox.x, viewBox.y, viewBox.w, viewBox.h, 255);
-}
-
-
-#endif //_TVG_SVG_SCENE_BUILDER_CPP_
+}
\ No newline at end of file