lottie/vector: move all vector objects to its own namesapce 48/184148/3
authorsubhransu sekhar mohanty <smohantty@subhransus-MacBook-Air.local>
Sun, 15 Jul 2018 02:59:30 +0000 (11:59 +0900)
committerHermet Park <chuneon.park@samsung.com>
Mon, 16 Jul 2018 12:17:13 +0000 (12:17 +0000)
Change-Id: I1f7ebc743b45d2ae0857f5d645ca1495e382b3c3

30 files changed:
src/lottie/lottieitem.h
src/lottie/lottiemodel.h
src/vector/vbezier.cpp
src/vector/vbezier.h
src/vector/vbitmap.cpp
src/vector/vbitmap.h
src/vector/vbrush.cpp
src/vector/vbrush.h
src/vector/vdasher.cpp
src/vector/vdasher.h
src/vector/vdrawhelper.h
src/vector/vglobal.h
src/vector/vinterpolator.cpp
src/vector/vinterpolator.h
src/vector/vmatrix.cpp
src/vector/vmatrix.h
src/vector/vpainter.cpp
src/vector/vpainter.h
src/vector/vpath.cpp
src/vector/vpath.h
src/vector/vpathmesure.cpp
src/vector/vpathmesure.h
src/vector/vpoint.h
src/vector/vraster.cpp
src/vector/vraster.h
src/vector/vrect.h
src/vector/vregion.cpp
src/vector/vregion.h
src/vector/vrle.cpp
src/vector/vrle.h

index 829ac07caa634cd799ef9a2a1f30c64c92bfb8b2..d6e9261180bd03788eab08418e6f0d7238ee225b 100644 (file)
@@ -12,6 +12,8 @@
 #include"vbrush.h"
 #include"vpainter.h"
 
+V_USE_NAMESPACE
+
 enum class DirtyFlagBit
 {
    None   = 0x0001,
index 80cca54872ccf48dae315614c568e9796d1749aa..e6c5d9d27533d982215c347debd9ba479c2809b1 100644 (file)
@@ -12,6 +12,7 @@
 #include"vbrush.h"
 #include"vpath.h"
 
+V_USE_NAMESPACE
 
 class LOTCompositionData;
 class LOTLayerData;
index 3ae1e1dc64425dba34c3effb4f2105064df60329..34e509383821a29f178098517ba4bee8ccd41181 100644 (file)
@@ -2,6 +2,8 @@
 
 #include<cmath>
 
+V_BEGIN_NAMESPACE
+
 // Approximate sqrt(x*x + y*y) using the alpha max plus beta min algorithm.
 // This uses alpha = 1, beta = 3/8, which results in a maximum error of less
 // than 7% compared to the correct value.
@@ -112,5 +114,5 @@ VBezier::splitAtLength(float len, VBezier *left, VBezier *right)
    right->parameterSplitLeft(t, left);
 }
 
-
+V_END_NAMESPACE
 
index 92f44183298f3fbe0c7d6b4214b8c76fd321b3d6..dd3f4cf869193edcd94eb1e917d073d2bc21d6fc 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <vpoint.h>
 
+V_BEGIN_NAMESPACE
+
 class  VBezier
 {
 public:
@@ -106,5 +108,6 @@ inline void VBezier::split(VBezier *firstHalf, VBezier *secondHalf) const
     firstHalf->y4 = secondHalf->y1 = (firstHalf->y3 + secondHalf->y2)*.5;
 }
 
+V_END_NAMESPACE
 
 #endif //VBEZIER_H
index 4746df9cd0c9cbd5ef9bf4b0f90048724ad8285f..a8edd233c5f016ca2ed6943a1899ca83a91028c3 100644 (file)
@@ -2,6 +2,8 @@
 #include "vglobal.h"
 #include<string.h>
 
+V_BEGIN_NAMESPACE
+
 struct VBitmapData
 {
     ~VBitmapData();
@@ -280,3 +282,4 @@ void VBitmap::fill(uint pixel)
         return;
 }
 
+V_END_NAMESPACE
index 5017063ba3124562a4070b3d83b67d8dc2ebf7cd..ca3f2a1ef20c936adc63408eff11620988545964 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "vrect.h"
 
+V_BEGIN_NAMESPACE
+
 struct VBitmapData;
 typedef void (*VBitmapCleanupFunction)(void *);
 class VBitmap
@@ -44,4 +46,6 @@ private:
     VBitmapData    *d;
 };
 
+V_END_NAMESPACE
+
 #endif // VBITMAP_H
index aa8ba96b70c95cfcc67759f4e4c5c7d42d1b724e..55b015dff03a8d90a863badd50db55ebd919e346 100644 (file)
@@ -1,5 +1,7 @@
 #include"vbrush.h"
 
+V_BEGIN_NAMESPACE
+
 VGradient::VGradient(VGradient::Type type):mType(type), mSpread(VGradient::Spread::Pad), mMode(VGradient::Mode::Absolute)
 {
 
@@ -75,3 +77,5 @@ VBrush::VBrush(const VGradient *gradient):mType(VBrush::Type::NoBrush)
         mType = VBrush::Type::RadialGradient;
     }
 }
+
+V_END_NAMESPACE
index e93c9b1e0b96edc85ede7b0fda566bca259223ec..772019f40c7a7a046538bab5dc2b2dbc36a21f22 100644 (file)
@@ -6,6 +6,8 @@
 #include"vmatrix.h"
 #include<vector>
 
+V_BEGIN_NAMESPACE
+
 typedef std::pair<float, VColor>  VGradientStop;
 typedef std::vector<VGradientStop> VGradientStops;
 class VGradient
@@ -79,4 +81,6 @@ public:
     const VGradient   *mGradient;
 };
 
+V_END_NAMESPACE
+
 #endif // VBRUSH_H
index f819bf94278d876fce0db519488aa1366c40f57f..8c9f7382de1161300d093bb92f5875af251bf5c9 100644 (file)
@@ -1,6 +1,8 @@
 #include"vdasher.h"
 #include"vbezier.h"
 
+V_BEGIN_NAMESPACE
+
 class VLine
 {
 public:
@@ -238,3 +240,4 @@ VPath VDasher::dashed(const VPath &path)
     return mDashedPath;
 }
 
+V_END_NAMESPACE
index ed975585e3c27b428c6a47da7d225fd2a2f9aab5..5b5c66d5655ed8211901bbe9bc4cf4160d72dc29 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef VDASHER_H
 #define VDASHER_H
 #include "vpath.h"
+
+V_BEGIN_NAMESPACE
+
 class VDasher
 {
  public:
@@ -26,4 +29,7 @@ private:
     float                  mDashOffset;
     VPath                 mDashedPath;
 };
+
+V_END_NAMESPACE
+
 #endif // VDASHER_H
index 0826f00908309e76fdac4affb4d79bb5a9aba28d..b48070592115a67a0bf683578e8759ebbfebe727 100644 (file)
@@ -9,6 +9,8 @@
 #include"assert.h"
 #include<cstring>
 
+V_USE_NAMESPACE
+
 struct VSpanData;
 struct Operator;
 
index fb96f304cfa6cec9fb6466483ce0b85b822007b2..aa9e617bad884fe90e6d91aaff7290655905f556 100644 (file)
@@ -12,6 +12,20 @@ typedef uint16_t         ushort;
 typedef uint8_t          uchar;
 
 
+#if !defined(V_NAMESPACE)
+
+# define V_USE_NAMESPACE
+# define V_BEGIN_NAMESPACE
+# define V_END_NAMESPACE
+
+#else /* user namespace */
+
+# define V_USE_NAMESPACE using namespace ::V_NAMESPACE;
+# define V_BEGIN_NAMESPACE namespace V_NAMESPACE {
+# define V_END_NAMESPACE }
+
+#endif
+
 #define V_UNUSED __attribute__((__unused__))
 #define V_REQUIRED_RESULT __attribute__ ((__warn_unused_result__))
 
index 5c285f6420204939cfb44546811ed9eb11cf9f60..90f09362640a7e92d436943e2c950e83473391d8 100644 (file)
@@ -1,6 +1,8 @@
 #include"vinterpolator.h"
 #include<cmath>
 
+V_BEGIN_NAMESPACE
+
 #define NEWTON_ITERATIONS          4
 #define NEWTON_MIN_SLOPE           0.02
 #define SUBDIVISION_PRECISION      0.0000001
@@ -128,3 +130,5 @@ VInterpolator::BinarySubdivide(float aX, float aA, float aB) const
 
   return currentT;
 }
+
+V_END_NAMESPACE
index 23c78e89cf84127d1956450defc8275b3bbf0448..f609d0ce4db27645552fa01249fae59cf02ba2e8 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "vpoint.h"
 
+V_BEGIN_NAMESPACE
+
 class VInterpolator
 {
 public:
@@ -76,4 +78,7 @@ private:
     float mSampleValues[kSplineTableSize];
     static const float kSampleStepSize;
 };
+
+V_END_NAMESPACE
+
 #endif // VINTERPOLATOR_H
index 9f474840462879efb3d0fe94b94e3c69fdcd54c3..ad5192d2463404cc9992740892f41be43b671671 100644 (file)
@@ -4,6 +4,8 @@
 #include<cassert>
 #include<vglobal.h>
 
+V_BEGIN_NAMESPACE
+
 /*  m11  m21  mtx
  *  m12  m22  mty
  *  m13  m23  m33
@@ -832,4 +834,5 @@ float VMatrix::m33()const
     return d->m33;
 }
 
+V_END_NAMESPACE
 
index 4e43b47dbdce106bc6d9edbe04ce87aec0f3e281..10c632a3bdca7280b8a24bc156c1709ee825004f 100644 (file)
@@ -4,6 +4,8 @@
 #include "vregion.h"
 #include "vglobal.h"
 
+V_BEGIN_NAMESPACE
+
 struct VMatrixData;
 class  VMatrix
 {
@@ -89,4 +91,6 @@ inline VPointF VMatrix::map(float x, float y) const
     return map(VPointF(x, y));
 }
 
+V_END_NAMESPACE
+
 #endif // VMATRIX_H
index 5d3f4ebfabae521c81febd3940543bb808a8c185..56fbf411e5f370420ca70fc8b860248b8b0eb3b6 100644 (file)
@@ -1,6 +1,8 @@
 #include"vpainter.h"
 #include"vdrawhelper.h"
 
+V_BEGIN_NAMESPACE
+
 class VPainterImpl
 {
 public:
@@ -62,3 +64,5 @@ void VPainter::drawRle(const VPoint &pos, const VRle &rle)
 {
     mImpl->drawRle(pos, rle);
 }
+
+V_END_NAMESPACE
index 740f7326563c0ba91b8ebae4d763549e20cc0760..d7977fbc407ca694984a905ea7da628cfe0f6661 100644 (file)
@@ -5,6 +5,8 @@
 #include"vrle.h"
 #include"vbrush.h"
 
+V_BEGIN_NAMESPACE
+
 class VBitmap;
 class VPainterImpl;
 class VPainter {
@@ -24,4 +26,6 @@ private:
     VPainterImpl  *mImpl;
 };
 
+V_END_NAMESPACE
+
 #endif //VPAINTER_H
index 60f4c92a23568d04739cbb25a39240dd84a7a0e4..4df29184827492c75886cb98935de8ea4e623f50 100644 (file)
@@ -5,6 +5,8 @@
 #include"vbezier.h"
 #include "vrect.h"
 
+V_BEGIN_NAMESPACE
+
 struct VPathData
 {
     void copy(VPathData *o);
@@ -733,3 +735,5 @@ void VPath::transform(const VMatrix &m)
     detach();
     d->transform(m);
 }
+
+V_END_NAMESPACE
index 93c4f5316ad486f92d42aae04e5a9cee68c24beb..2fe0b9de48c73aa100de858de522ca8c1bcee01a 100644 (file)
@@ -5,6 +5,8 @@
 #include "vmatrix.h"
 #include<vector>
 
+V_BEGIN_NAMESPACE
+
 struct VPathData;
 class VPath
 {
@@ -77,4 +79,6 @@ inline void VPath::cubicTo(float c1x, float c1y, float c2x, float c2y, float ex,
       cubicTo(VPointF(c1x, c1y), VPointF(c2x, c2y), VPointF(ex, ey));
 }
 
+V_END_NAMESPACE
+
 #endif // VPATH_H
index 358721cdc5b1dd5e43e5e69c9aeba237a96b9b48..cabbe42d1e3e4c021834cfd86fcb321f08223e40 100644 (file)
@@ -1,6 +1,10 @@
 #include"vpathmesure.h"
 
+V_BEGIN_NAMESPACE
+
 class VPathMesureData
 {
    VPath      *path;
-};
\ No newline at end of file
+};
+
+V_END_NAMESPACE
index 98605f7b974e2d56eed2806641f0e1597afe3ee3..0a97fc13dbe644a081160c2f5a117d7ade080967 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "vpath.h"
 
+V_BEGIN_NAMESPACE
+
 class VPathMesureData;
 class VPathMesure
 {
@@ -15,4 +17,6 @@ private:
     VPathMesureData *d;
 };
 
+V_END_NAMESPACE
+
 #endif // VPATHMESURE_H
index 7eb2af5f9db616e9c87ec87de88f10109f0407b0..9206856238d6512f0f1ad693fbf7e394349e4571 100644 (file)
@@ -3,6 +3,8 @@
 
 #include"vglobal.h"
 
+V_BEGIN_NAMESPACE
+
 class  VPointF
 {
 public:
@@ -144,4 +146,6 @@ inline VSize &VSize::operator+=(const VSize &p) noexcept
 inline VSize &VSize::operator-=(const VSize &p) noexcept
 { mw-=p.mw; mh-=p.mh; return *this;  }
 
+V_END_NAMESPACE
+
 #endif // VPOINT_H
index 0bd3a2c623d57241e8e56d801d4641836cd02ce6..3328977a519c537593ad3a89c7af4c643b179a5f 100644 (file)
@@ -6,6 +6,8 @@
 #include<cstring>
 #include"vdebug.h"
 
+V_BEGIN_NAMESPACE
+
 struct FTOutline
 {
 public:
@@ -312,3 +314,5 @@ VRle VRaster::generateStrokeInfo(const FTOutline *outline, CapStyle cap, JoinSty
     return d->generateStrokeInfoAsync(&outline->ft, ftCap, ftJoin,
                                       ftWidth, ftMeterLimit, ftbool);
 }
+
+V_END_NAMESPACE
index 7beda50e87923f18e1a63890e4505f3e44f3201a..5b8d0ad2990b5c9ab7e7858f73a53c9edb7802b1 100644 (file)
@@ -3,6 +3,8 @@
 #include"vrle.h"
 #include<future>
 
+V_BEGIN_NAMESPACE
+
 struct FTOutline;
 class VPath;
 
@@ -30,4 +32,7 @@ private:
     VRaster();
     VRasterPrivate *d;
 };
+
+V_END_NAMESPACE
+
 #endif // VRASTER_H
index 0f002dfd556976770c37bdf506f57527470d88d8..c16ecab96beff2533c09e0241a5934735c2a90d0 100644 (file)
@@ -3,6 +3,8 @@
 #include"vglobal.h"
 #include"vpoint.h"
 
+V_BEGIN_NAMESPACE
+
 class  VRect
 {
 public:
@@ -181,4 +183,6 @@ V_CONSTEXPR inline float VRectF::width() const
 V_CONSTEXPR inline float VRectF::height() const
 { return y2 - y1; }
 
+V_END_NAMESPACE
+
 #endif // VRECT_H
index 3db9ad28f7fc89503e3b7c3ed1c2d53941a6a7a6..a0cd00e1bd90cf82d7c0f98215df8b079317a580 100644 (file)
@@ -2041,6 +2041,8 @@ typedef region_type_t VRegionPrivate;
 
 #include "vregion.h"
 
+V_BEGIN_NAMESPACE
+
 static VRegionPrivate regionPrivate = {{0,0,0,0}, NULL};
 const VRegion::VRegionData VRegion::shared_empty = {RefCount(-1), &regionPrivate};
 
@@ -2366,3 +2368,5 @@ VDebug& operator<<(VDebug& os, const VRegion& o)
 
 }
 
+V_END_NAMESPACE
+
index 75e7c388f3316b60c08af7201f1ce7418e319d57..e5986af03563acbfc6982034ddbf6b9b8cd9c0c4 100644 (file)
@@ -6,6 +6,8 @@
 #include<vpoint.h>
 #include<utility>
 
+V_BEGIN_NAMESPACE
+
 typedef struct pixman_region  region_type_t;
 typedef region_type_t VRegionPrivate;
 
@@ -70,4 +72,7 @@ inline VRegion VRegion::translated(int dx, int dy) const
 {
     return translated(VPoint(dx,dy));
 }
+
+V_END_NAMESPACE
+
 #endif //VREGION_H
index a7a70dece187968e869451e1fce8797c290a7543..df0f24ee27a5ace1d626b805aec023f914cc8678 100644 (file)
@@ -8,6 +8,8 @@
 #include"vdebug.h"
 #include"vregion.h"
 
+V_BEGIN_NAMESPACE
+
 struct VRleHelper
 {
    ushort        alloc;
@@ -804,6 +806,7 @@ VDebug& operator<<(VDebug& os, const VRle& o)
     return os;
 }
 
+V_END_NAMESPACE
 
 
 
index 4697b1f0d9b2b40cf4782fd88ca7a2eee66c8a51..0fe3bcfb493fd97d736ffe7ce417d0bfcc077148 100644 (file)
@@ -4,6 +4,8 @@
 #include<vrect.h>
 #include<vpoint.h>
 
+V_BEGIN_NAMESPACE
+
 struct VRleData;
 class VRle
 {
@@ -59,4 +61,6 @@ inline VRle operator*(int alpha, const VRle &rle)
     return (rle * alpha);
 }
 
+V_END_NAMESPACE
+
 #endif // VRLE_H