Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-05-14 02:58:27 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-05-14 02:58:27 +0400
commit6ea2dec330a0d460deb1396f258c461be34fa3c8 (patch)
tree567536490f059ab57592b5352b60f253b7e3ea1c /source/blender/freestyle/intern/view_map
parent1a91af691e984714204aa55326245c79a0b06fb8 (diff)
Added support for WITH_CXX_GUARDEDALLOC build option to the Freestyle module.
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.h19
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.h9
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.h8
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.h14
-rw-r--r--source/blender/freestyle/intern/view_map/GridDensityProvider.h13
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.h8
-rw-r--r--source/blender/freestyle/intern/view_map/Interface1D.h9
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.h9
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h8
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h8
-rw-r--r--source/blender/freestyle/intern/view_map/SphericalGrid.h19
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.h9
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h17
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h12
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.h9
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.h9
16 files changed, 180 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h
index 5ceb84761bf..8aa5167732d 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.h
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.h
@@ -50,6 +50,10 @@
#include "BKE_global.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class BoxGrid
@@ -66,6 +70,11 @@ public:
// However, code comments make it clear that userdata is deprecated, so we avoid the temptation
// to save 4 or 8 bytes.
WFace *face;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:OccluderData")
+#endif
};
private:
@@ -126,6 +135,11 @@ public:
real _occludeeDepth;
//deque<OccluderData*>::iterator _current, _occludeeCandidate;
vector<OccluderData*>::iterator _current, _occludeeCandidate;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:Iterator")
+#endif
};
class Transform : public GridHelpers::Transform
@@ -176,6 +190,11 @@ private:
occluderContainer _faces;
Vec3r _viewpoint;
bool _enableQI;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid")
+#endif
};
inline void BoxGrid::Iterator::initBeforeTarget()
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
index fb0702278ba..59d6e23312f 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
@@ -39,6 +39,10 @@
#include "../winged_edge/Curvature.h"
#include "../winged_edge/WXEdge.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
using namespace Geometry;
@@ -231,6 +235,11 @@ protected:
ProgressBar *_pProgressBar;
RenderMonitor *_pRenderMonitor;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FEdgeXDetector")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h
index 5036433e586..69f6f42e022 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.h
+++ b/source/blender/freestyle/intern/view_map/Functions0D.h
@@ -43,6 +43,10 @@
#include "../system/Exception.h"
#include "../system/Precision.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class FEdge;
@@ -103,6 +107,10 @@ public:
{
return Director_BPy_UnaryFunction0D___call__(this, py_uf0D, iter);
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction0D")
+#endif
};
#ifdef SWIG
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h
index b6f914cd43b..a4dd1cd5e03 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.h
+++ b/source/blender/freestyle/intern/view_map/Functions1D.h
@@ -39,6 +39,10 @@
#include "../python/Director.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
//
@@ -119,6 +123,11 @@ public:
protected:
IntegrationType _integration;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction1D")
+#endif
};
@@ -161,6 +170,11 @@ public:
protected:
IntegrationType _integration;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction1D_void")
+#endif
};
diff --git a/source/blender/freestyle/intern/view_map/GridDensityProvider.h b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
index a39f17753d4..d096fb3aacd 100644
--- a/source/blender/freestyle/intern/view_map/GridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
@@ -37,6 +37,10 @@
#include "BKE_global.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class GridDensityProvider
@@ -123,6 +127,11 @@ protected:
unsigned _cellsX, _cellsY;
float _cellSize;
float _cellOrigin[2];
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridDensityProvider")
+#endif
};
class GridDensityProviderFactory
@@ -142,6 +151,10 @@ public:
virtual auto_ptr<GridDensityProvider> newGridDensityProvider(OccluderSource& source) = 0;
virtual ~GridDensityProviderFactory () {}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridDensityProviderFactory")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h
index 770929b21f9..c9776bb77fa 100644
--- a/source/blender/freestyle/intern/view_map/Interface0D.h
+++ b/source/blender/freestyle/intern/view_map/Interface0D.h
@@ -40,6 +40,10 @@
#include "../winged_edge/Nature.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -176,6 +180,10 @@ public:
PyErr_SetString(PyExc_TypeError, "method castToTVertex() not properly overridden");
return 0;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Interface0D")
+#endif
};
diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h
index 02c9468554f..2c1f4956e96 100644
--- a/source/blender/freestyle/intern/view_map/Interface1D.h
+++ b/source/blender/freestyle/intern/view_map/Interface1D.h
@@ -40,6 +40,10 @@
#include "../winged_edge/Nature.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -220,6 +224,11 @@ public:
protected:
unsigned _timeStamp;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Interface1D")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.h b/source/blender/freestyle/intern/view_map/OccluderSource.h
index 1f9209d8445..b6f30ce9e3a 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.h
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.h
@@ -32,6 +32,10 @@
#include "../winged_edge/WEdge.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class OccluderSource
@@ -66,6 +70,11 @@ protected:
const GridHelpers::Transform& transform;
void buildCachedPolygon();
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OccluderSource")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index c4221069a66..e0bf2ff6120 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -48,6 +48,10 @@
#include "../winged_edge/Curvature.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -1867,6 +1871,10 @@ public:
{
_importance = importance;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SShape")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
index 0a1e86a1449..4002385a823 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
@@ -35,6 +35,10 @@
#include "../system/FreestyleConfig.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
using namespace Geometry;
@@ -126,6 +130,10 @@ public:
/*! From world to image */
static Vec3r WorldToImage(const Vec3r& M);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SilhouetteGeomEngine")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h
index 9551a0a3e95..56d2ae3cf5e 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.h
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h
@@ -49,6 +49,10 @@
#include "BKE_global.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class SphericalGrid
@@ -65,6 +69,10 @@ public:
// However, code comments make it clear that userdata is deprecated, so we avoid the temptation to save
// 4 or 8 bytes.
WFace *face;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid:OccluderData")
+#endif
};
private:
@@ -125,6 +133,12 @@ public:
real _occludeeDepth;
//deque<OccluderData*>::iterator _current, _occludeeCandidate;
vector<OccluderData*>::iterator _current, _occludeeCandidate;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid:Iterator")
+#endif
+
};
class Transform : public GridHelpers::Transform
@@ -175,6 +189,11 @@ private:
occluderContainer _faces;
Vec3r _viewpoint;
bool _enableQI;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid")
+#endif
};
inline void SphericalGrid::Iterator::initBeforeTarget()
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
index c70edcc9af2..79321cafefe 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
@@ -34,6 +34,10 @@
#include "../system/FreestyleConfig.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -144,6 +148,11 @@ public:
protected:
void Clear();
void Build();
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SteerableViewMap")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
index c1b228c13c6..b036410a9fe 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
@@ -47,6 +47,10 @@
#include "../system/FreestyleConfig.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -121,6 +125,10 @@ public:
{
return !(*this == b);
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OWXFaceLayer")
+#endif
};
class WXEdge;
@@ -160,6 +168,10 @@ public:
{
return !(*this == b);
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OWXEdge")
+#endif
};
class WOEdge;
@@ -279,6 +291,11 @@ protected:
SVertexMap _SVertexMap;
SShape *_pCurrentSShape;
ViewShape *_pCurrentVShape;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewEdgeXBuilder")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index cd3dd7aafa2..f684f2b919d 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -39,6 +39,10 @@
#include "../system/BaseIterator.h"
#include "../system/FreestyleConfig.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
/**********************************/
@@ -231,6 +235,10 @@ public:
/* connects a FEdge to the graph trough a SVertex */
//FEdge *Connect(FEdge *ioEdge, SVertex *ioVertex);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMap")
+#endif
};
/**********************************/
@@ -1584,6 +1592,10 @@ public:
/* removes the view vertex iViewVertex in the View Shape. */
void RemoveVertex(ViewVertex *iViewVertex);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewShape")
+#endif
};
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
index 2fb98934ea9..05596daa85b 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
@@ -52,6 +52,10 @@
#include "../winged_edge/WEdge.h"
#include "../winged_edge/WXEdge.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
using namespace Geometry;
@@ -247,6 +251,11 @@ protected:
void FindOccludee(FEdge *fe, Grid *iGrid, real epsilon, Polygon3r **oaPolygon, unsigned timestamp);
void FindOccludee(FEdge *fe, Grid *iGrid, real epsilon, Polygon3r **oaPolygon, unsigned timestamp,
Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector<WVertex*>& faceVertices);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMapBuilder")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
index 7ba8c77a452..d37d0b6e5a5 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
@@ -39,6 +39,10 @@
#include "../winged_edge/WEdge.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class NodeShape;
@@ -98,6 +102,11 @@ private:
Nature::EdgeNature _nature;
FrsMaterial _FrsMaterial;
bool _overloadFrsMaterial;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMapTesselator")
+#endif
};
/*! Class to tesselate the 2D projected silhouette */