Core: remove WITH_CXX_GUARDEDALLOC option

This implements the proposal from #124512. For that it contains the following
changes:
* Remove the global override of `new`/`delete` when `WITH_CXX_GUARDEDALLOC` was
  enabled.
* Always use `MEM_CXX_CLASS_ALLOC_FUNCS` where it is currently used. This used
  to be guarded by `WITH_CXX_GUARDEDALLOC` in some but not all cases. This means
  that a few classes which didn't use our guarded allocator by default before,
  are now using it.

Pull Request: https://projects.blender.org/blender/blender/pulls/130181
This commit is contained in:
Jacques Lucke 2024-11-13 13:39:49 +01:00
parent 702bdde96d
commit 64a9260921
139 changed files with 88 additions and 712 deletions

View file

@ -777,13 +777,6 @@ mark_as_advanced(WITH_MEM_JEMALLOC)
option(WITH_MEM_VALGRIND "Enable extended valgrind support for better reporting" OFF)
mark_as_advanced(WITH_MEM_VALGRIND)
# Debug
option(WITH_CXX_GUARDEDALLOC "\
Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)"
OFF
)
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT)
@ -2598,12 +2591,6 @@ mark_as_advanced(
# -------------------------------------------------------------------------------
# Global Defines
# better not set includes here but this debugging option is off by default.
if(WITH_CXX_GUARDEDALLOC)
include_directories(${CMAKE_SOURCE_DIR}/intern/guardedalloc)
add_definitions(-DWITH_CXX_GUARDEDALLOC)
endif()
if(WITH_ASSERT_ABORT)
add_definitions(-DWITH_ASSERT_ABORT)
endif()

View file

@ -26,7 +26,3 @@ set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
if(WIN32)
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)
endif()
# This may have issues with C++ initialization order, needs to be tested
# on all platforms to be sure this is safe to enable.
# set(WITH_CXX_GUARDEDALLOC ON CACHE BOOL "" FORCE)

View file

@ -5,6 +5,7 @@
set(INC
.
intern
../guardedalloc
)
set(INC_SYS

View file

@ -5,9 +5,7 @@
#ifndef __DUALCON_H__
#define __DUALCON_H__
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#ifdef __cplusplus
extern "C" {

View file

@ -33,9 +33,7 @@ class VirtualMemoryAllocator {
virtual int getAll() = 0;
virtual int getBytes() = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:VirtualMemoryAllocator")
#endif
};
/**
@ -194,9 +192,7 @@ template<int N> class MemoryAllocator : public VirtualMemoryAllocator {
return N;
};
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:MemoryAllocator")
#endif
};
#endif /* __MEMORYALLOCATOR_H__ */

View file

@ -7,9 +7,7 @@
#include "GeoCommon.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
/*
* Virtual class for input file readers
@ -44,9 +42,7 @@ class ModelReader {
virtual void printInfo() = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:ModelReader")
#endif
};
#endif /* __MODELREADER_H__ */

View file

@ -2,9 +2,7 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#include "Projections.h"
#include <math.h>

View file

@ -106,9 +106,7 @@ class CubeTriangleIsect {
float getIntersectionPrimary(int edgeInd) const;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:CubeTriangleIsect")
#endif
};
#endif /* __PROJECTIONS_H__ */

View file

@ -75,9 +75,7 @@ class GridQueue {
return 1;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:GridQueue")
#endif
};
#endif /* __QUEUE_H__ */

View file

@ -24,9 +24,7 @@ class Cubes {
}
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Cubes")
#endif
};
#endif /* __CUBES_H__ */

View file

@ -143,9 +143,7 @@ class DualConInputReader : public ModelReader {
return sizeof(DualConInputReader);
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:DualConInputReader")
#endif
};
void *dualcon(const DualConInput *input_mesh,

View file

@ -2,9 +2,7 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#include "octree.h"
#include <Eigen/Dense>

View file

@ -1390,9 +1390,7 @@ class Octree {
return npar;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Octree")
#endif
};
#endif /* __OCTREE_H__ */

View file

@ -5,6 +5,7 @@
set(INC
PUBLIC .
../../source/blender/imbuf
../guardedalloc
)
set(INC_SYS

View file

@ -110,7 +110,5 @@ class GHOST_IContext {
std::function<void(void)> swap_buffers_post_callback) = 0;
#endif
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IContext")
#endif
};

View file

@ -56,7 +56,5 @@ class GHOST_IEvent {
*/
virtual GHOST_TEventDataPtr getData() const = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEvent")
#endif
};

View file

@ -34,7 +34,5 @@ class GHOST_IEventConsumer {
*/
virtual bool processEvent(const GHOST_IEvent *event) = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEventConsumer")
#endif
};

View file

@ -560,7 +560,5 @@ class GHOST_ISystem {
/** Function to call that sets the back-trace. */
static GHOST_TBacktraceFn m_backtrace_fn;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystem")
#endif
};

View file

@ -79,7 +79,5 @@ class GHOST_ISystemPaths {
/** The one and only system paths. */
static GHOST_ISystemPaths *m_systemPaths;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystemPaths")
#endif
};

View file

@ -54,7 +54,5 @@ class GHOST_ITimerTask {
*/
virtual void setUserData(const GHOST_TUserDataPtr userData) = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ITimerTask")
#endif
};

View file

@ -364,7 +364,5 @@ class GHOST_IWindow {
virtual void endIME() = 0;
#endif /* WITH_INPUT_IME */
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow")
#endif
};

View file

@ -159,9 +159,7 @@ class GHOST_Rect {
/** Bottom coordinate of the rectangle */
int32_t m_b;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_Rect")
#endif
};
inline int32_t GHOST_Rect::getWidth() const

View file

@ -21,17 +21,9 @@
/* This is used by `GHOST_C-api.h` too, cannot use C++ conventions. */
// NOLINTBEGIN: modernize-use-using
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#else
/* Convenience unsigned abbreviations (#WITH_CXX_GUARDEDALLOC defines these). */
typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef unsigned char uchar;
#endif
#include "MEM_guardedalloc.h"
#if defined(WITH_CXX_GUARDEDALLOC) && defined(__cplusplus)
#if defined(__cplusplus)
# define GHOST_DECLARE_HANDLE(name) \
typedef struct name##__ { \
int unused; \

View file

@ -44,7 +44,5 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
/** The data passed back through the call-back routine. */
GHOST_TUserDataPtr m_userData;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_CallbackEventConsumer")
#endif
};

View file

@ -195,9 +195,7 @@ class GHOST_Context : public GHOST_IContext {
static void initClearGL();
#endif
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_Context")
#endif
};
#ifdef _WIN32

View file

@ -106,7 +106,5 @@ class GHOST_DisplayManager {
/** The list with display settings for the main display. */
std::vector<GHOST_DisplaySettings> m_settings;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DisplayManager")
#endif
};

View file

@ -133,7 +133,5 @@ class GHOST_DropTargetWin32 : public IDropTarget {
/* Data type of the dragged object */
GHOST_TDragnDropTypes m_draggedObjectType;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetWin32")
#endif
};

View file

@ -98,7 +98,5 @@ class GHOST_DropTargetX11 {
/* Counter of references to global #XDND structures. */
static int m_refCounter;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetX11")
#endif
};

View file

@ -120,7 +120,5 @@ class GHOST_EventManager {
/** The list with event consumers. */
TConsumerVector m_consumers;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
#endif
};

View file

@ -92,7 +92,5 @@ class GHOST_TimerManager {
/** The list with event consumers. */
TTimerVector m_timers;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_TimerManager")
#endif
};

View file

@ -123,7 +123,5 @@ class GHOST_WindowManager {
/** Window that was active before entering full-screen state. */
GHOST_IWindow *m_activeWindowBeforeFullScreen;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_WindowManager")
#endif
};

View file

@ -63,14 +63,6 @@ endif()
blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
add_library(bf::intern::guardedalloc ALIAS bf_intern_guardedalloc)
# Override C++ allocator, optional.
if(WITH_CXX_GUARDEDALLOC)
set(SRC
cpp/mallocn.cpp
)
blender_add_lib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
endif()
if(WITH_GTESTS)
set(TEST_SRC
tests/guardedalloc_alignment_test.cc

View file

@ -1,51 +0,0 @@
/* SPDX-FileCopyrightText: 2002-2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup intern_mem
*/
#include <cstddef>
#include <new>
#include "../intern/mallocn_intern_function_pointers.hh"
using namespace mem_guarded::internal;
void *operator new(size_t size, const char *str);
void *operator new[](size_t size, const char *str);
/* not default but can be used when needing to set a string */
void *operator new(size_t size, const char *str)
{
return mem_mallocN_aligned_ex(size, 1, str, AllocationType::NEW_DELETE);
}
void *operator new[](size_t size, const char *str)
{
return mem_mallocN_aligned_ex(size, 1, str, AllocationType::NEW_DELETE);
}
void *operator new(size_t size)
{
return mem_mallocN_aligned_ex(size, 1, "C++/anonymous", AllocationType::NEW_DELETE);
}
void *operator new[](size_t size)
{
return mem_mallocN_aligned_ex(size, 1, "C++/anonymous[]", AllocationType::NEW_DELETE);
}
void operator delete(void *p) throw()
{
/* `delete nullptr` is valid in c++. */
if (p) {
mem_freeN_ex(p, AllocationType::NEW_DELETE);
}
}
void operator delete[](void *p) throw()
{
/* `delete nullptr` is valid in c++. */
if (p) {
mem_freeN_ex(p, AllocationType::NEW_DELETE);
}
}

View file

@ -96,9 +96,7 @@ struct CryptomatteHash {
struct CryptomatteLayer {
blender::Map<std::string, CryptomatteHash> hashes;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("cryptomatte:CryptomatteLayer")
#endif
static std::unique_ptr<CryptomatteLayer> read_from_manifest(blender::StringRefNull manifest);
uint32_t add_ID(const ID &id);

View file

@ -51,9 +51,7 @@ struct CryptomatteSession {
blender::bke::cryptomatte::CryptomatteLayer &add_layer(std::string layer_name);
std::optional<std::string> operator[](float encoded_hash) const;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("cryptomatte:CryptomatteSession")
#endif
};
CryptomatteSession::CryptomatteSession(const Main *bmain)

View file

@ -214,9 +214,7 @@ template<typename T> class ImplicitSharedValue : public ImplicitSharingInfo {
{
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("ImplicitSharedValue");
#endif
private:
void delete_self_with_data() override

View file

@ -8,9 +8,7 @@
* Task graph.
*/
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#include "BLI_task.h"
@ -28,9 +26,7 @@ struct TaskGraph {
#endif
std::vector<std::unique_ptr<TaskNode>> nodes;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("task_graph:TaskGraph")
#endif
};
/* TaskNode - a node in the task graph. */
@ -94,9 +90,7 @@ struct TaskNode {
}
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("task_graph:TaskNode")
#endif
};
TaskGraph *BLI_task_graph_create()

View file

@ -4,9 +4,7 @@
#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
struct bNode;

View file

@ -4,9 +4,7 @@
#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -40,9 +38,7 @@ class Device {
*/
virtual void execute(struct WorkPackage *work) = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:Device")
#endif
};
} // namespace blender::compositor

View file

@ -8,9 +8,7 @@
#include "DNA_vec_types.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -51,9 +49,7 @@ class ExecutionModel {
virtual void execute(ExecutionSystem &exec_system) = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:BaseExecutionModel")
#endif
};
} // namespace blender::compositor

View file

@ -13,9 +13,7 @@
#include "COM_profiler.hh"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {

View file

@ -192,9 +192,7 @@ class ExecutionSystem {
/* allow the DebugInfo class to look at internals */
friend class DebugInfo;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystem")
#endif
};
} // namespace blender::compositor

View file

@ -16,9 +16,7 @@
#include "BLI_timeit.hh"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {

View file

@ -9,9 +9,7 @@
#include "COM_Enums.h"
#include "COM_ExecutionModel.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -84,9 +82,7 @@ class FullFrameExecutionModel : public ExecutionModel {
void update_progress_bar();
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:FullFrameExecutionModel")
#endif
};
} // namespace blender::compositor

View file

@ -679,9 +679,7 @@ class MemoryBuffer {
int to_y,
int to_channel_offset);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryBuffer")
#endif
};
} // namespace blender::compositor

View file

@ -59,9 +59,7 @@ class MetaData {
/* Invokes the given callback on each entry of the meta data. */
void for_each_entry(FunctionRef<void(const std::string &, const std::string &)> callback) const;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:MetaData")
#endif
};
struct MetaDataExtractCallbackData {

View file

@ -4,9 +4,7 @@
#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -104,9 +102,7 @@ class NodeConverter {
/** The internal builder for storing the results of the graph construction. */
NodeOperationBuilder *builder_;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeCompiler")
#endif
};
} // namespace blender::compositor

View file

@ -6,9 +6,7 @@
#include "DNA_node_types.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -96,9 +94,7 @@ class NodeGraph {
bNodeInstanceKey key,
bool is_active_group);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeGraph")
#endif
};
} // namespace blender::compositor

View file

@ -126,9 +126,7 @@ class NodeOperationInput {
*/
bool determine_canvas(const rcti &preferred_area, rcti &r_area);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeOperation")
#endif
};
class NodeOperationOutput {
@ -155,9 +153,7 @@ class NodeOperationOutput {
void determine_canvas(const rcti &preferred_area, rcti &r_area);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeOperation")
#endif
};
struct NodeOperationFlags {
@ -565,9 +561,7 @@ class NodeOperation {
/* allow the DebugInfo class to look at internals */
friend class DebugInfo;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeOperation")
#endif
};
std::ostream &operator<<(std::ostream &os, const NodeOperationFlags &node_operation_flags);

View file

@ -144,9 +144,7 @@ class NodeOperationBuilder {
void merge_equal_operations();
void merge_equal_operations(NodeOperation *from, NodeOperation *into);
void save_graphviz(StringRefNull name = "");
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeCompilerImpl")
#endif
};
/** Create a graphviz representation of the NodeOperationBuilder. */

View file

@ -9,9 +9,7 @@
#include "DNA_vec_types.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -81,9 +79,7 @@ class SharedOperationBuffers {
private:
BufferData &get_buffer_data(NodeOperation *op);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:SharedOperationBuffers")
#endif
};
} // namespace blender::compositor

View file

@ -4,9 +4,7 @@
#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#include <functional>
@ -27,9 +25,7 @@ struct WorkPackage {
*/
std::function<void()> executed_fn;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
#endif
};
} // namespace blender::compositor

View file

@ -4,9 +4,7 @@
#pragma once
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace blender::compositor {
@ -62,9 +60,7 @@ struct WorkScheduler {
static int current_thread_id();
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkScheduler")
#endif
};
} // namespace blender::compositor

View file

@ -101,9 +101,7 @@ struct AnimKeylist {
BLI_listbase_clear(&this->runtime.list_wrapper);
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("editors:AnimKeylist")
#endif
};
AnimKeylist *ED_keylist_create()

View file

@ -467,9 +467,7 @@ struct ViewOpsData_Utility : ViewOpsData {
WM_keyconfig_update_suppress_end();
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("ViewOpsData_Utility")
#endif
};
static bool view3d_navigation_poll_impl(bContext *C, const char viewlock)

View file

@ -189,9 +189,7 @@ struct ViewOpsData {
const bool use_cursor_init = false);
void end_navigation(bContext *C);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("ViewOpsData")
#endif
};
/* view3d_navigate.cc */

View file

@ -71,9 +71,7 @@ struct SnapCache_EditMesh : public SnapObjectContext::SnapCache {
this->clear();
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("SnapCache_EditMesh")
#endif
};
static Mesh *create_mesh(SnapObjectContext *sctx,

View file

@ -40,9 +40,7 @@ struct TransSeqSnapData {
blender::Array<blender::float2> source_snap_points;
blender::Array<blender::float2> target_snap_points;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("TransSeqSnapData")
#endif
};
/* -------------------------------------------------------------------- */

View file

@ -14,9 +14,7 @@
#include "../system/Precision.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -74,9 +72,7 @@ class Path {
static string getEnvVar(const string &iEnvVarName);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Config:Path")
#endif
};
//

View file

@ -17,9 +17,7 @@
#include "BLI_math_base.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -253,9 +251,7 @@ class AppView {
NodeGroup _p2DNode;
NodeDrawingStyle *_p2DSelectionNode;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:AppView")
#endif
};
} /* namespace Freestyle */

View file

@ -18,9 +18,7 @@
#include "../view_map/FEdgeXDetector.h"
#include "../view_map/ViewMapBuilder.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
struct Depsgraph;
struct Render;
@ -261,9 +259,7 @@ class Controller {
SceneHash sceneHashFunc;
real prevSceneHash;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Controller")
#endif
};
extern Controller *g_pController;

View file

@ -42,9 +42,7 @@
#include "DEG_depsgraph_query.hh"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -142,9 +140,7 @@ class BlenderFileLoader {
RenderMonitor *_pRenderMonitor;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BlenderFileLoader")
#endif
};
} /* namespace Freestyle */

View file

@ -81,9 +81,7 @@ class BlenderStrokeRenderer : public StrokeRenderer {
vector<StrokeRep *> _strokeReps;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BlenderStrokeRenderer")
#endif
};
} /* namespace Freestyle */

View file

@ -38,9 +38,7 @@ class BufferedStyleModule : public StyleModule {
private:
string _buffer;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BufferedStyleModule")
#endif
};
class BlenderStyleModule : public StyleModule {
@ -64,9 +62,7 @@ class BlenderStyleModule : public StyleModule {
private:
struct Text *_text;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BlenderStyleModule")
#endif
};
} /* namespace Freestyle */

View file

@ -14,9 +14,7 @@
#include "BLI_utildefines.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -124,9 +122,7 @@ template<class Point> class BBox {
Point _max;
bool _empty;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BBox")
#endif
};
template<class Point> BBox<Point> &operator+(const BBox<Point> &b1, const BBox<Point> &b2)

View file

@ -15,9 +15,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -44,9 +42,7 @@ class BezierCurveSegment {
return _Vertices;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurveSegment")
#endif
};
class BezierCurve {
@ -72,9 +68,7 @@ class BezierCurve {
return _Segments;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurve")
#endif
};
} /* namespace Freestyle */

View file

@ -57,9 +57,7 @@ class FastGrid : public Grid {
Cell **_cells;
uint _cells_size;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FastGrid")
#endif
};
} /* namespace Freestyle */

View file

@ -13,9 +13,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -140,9 +138,7 @@ class GeomCleaner {
uint *oVSize,
uint **oIndices);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GeomCleaner")
#endif
};
/** Binary operators */
@ -225,9 +221,7 @@ class IndexedVertex {
return (_Vector == v._Vector);
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IndexedVertex")
#endif
};
#if 0

View file

@ -22,9 +22,7 @@
#include "BLI_utildefines.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -69,9 +67,7 @@ class Cell {
Vec3r _orig;
OccludersSet _occluders;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Cell")
#endif
};
class GridVisitor {
@ -89,9 +85,7 @@ class GridVisitor {
return false;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridVisitor")
#endif
};
/** Gathers all the occluders belonging to the cells traversed by the ray */
@ -378,9 +372,7 @@ class Grid {
// a ray
OccludersSet _occluders; // List of all occluders inserted in the grid
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Grid")
#endif
};
//
@ -400,9 +392,7 @@ class VirtualOccludersSet {
Grid &grid;
OccludersSet::iterator it, end;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VirtualOccludersSet")
#endif
};
} /* namespace Freestyle */

View file

@ -18,9 +18,7 @@
#include "../winged_edge/WEdge.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -106,9 +104,7 @@ class Transform {
virtual ~Transform() = 0;
virtual Vec3r operator()(const Vec3r &point) const = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridHelpers:Transform")
#endif
};
inline bool insideProscenium(const real proscenium[4], const Polygon3r &polygon)

View file

@ -13,9 +13,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -60,9 +58,7 @@ class Noise {
/* UNUSED */
// int start;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Noise")
#endif
};
} /* namespace Freestyle */

View file

@ -14,9 +14,7 @@
#include "Geom.h"
#include "GeomUtils.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -154,9 +152,7 @@ template<class Point> class Polygon {
Point _max;
uint _id;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Geometry:Polygon")
#endif
};
//

View file

@ -12,9 +12,7 @@
#include <list>
#include <vector>
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -59,9 +57,7 @@ template<class Edge> class Intersection {
real tA; // parameter defining the intersection point with respect to the segment EdgeA.
real tB; // parameter defining the intersection point with respect to the segment EdgeB.
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Intersection")
#endif
};
#ifdef _MSC_VER
@ -167,9 +163,7 @@ template<class T, class Point> class Segment {
_Intersections; // list of intersections parameters
bool _order; // true if A and B are in the same order than _edge.A and _edge.B. false otherwise.
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Segment")
#endif
};
#ifdef _MSC_VER
@ -321,9 +315,7 @@ template<class T, class Point> class SweepLine {
std::vector<Segment<T, Point> *> _IntersectedEdges; // the list of intersected edges
std::vector<Intersection<Segment<T, Point>> *> _Intersections; // the list of all intersections.
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SweepLine")
#endif
};
} /* namespace Freestyle */

View file

@ -13,9 +13,7 @@
#include <math.h>
#include <vector>
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -264,9 +262,7 @@ template<class T, uint N> class Vec {
_dim = N,
};
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Vec")
#endif
};
//
@ -737,9 +733,7 @@ template<class T, uint M, uint N> class Matrix {
protected:
value_type _coord[_SIZE];
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Matrix")
#endif
};
#undef _SIZE

View file

@ -17,9 +17,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -101,9 +99,7 @@ class NormalCycle {
real M_[6];
int i_[3];
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OGF:NormalCycle")
#endif
};
inline void NormalCycle::accumulate_dihedral_angle(const Vec3r &edge,

View file

@ -14,9 +14,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -90,9 +88,7 @@ class GaussianFilter {
protected:
void computeMask();
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GaussianFilter")
#endif
};
/*

View file

@ -11,9 +11,7 @@
#include <string.h> // for memcpy
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -159,9 +157,7 @@ class FrsImage {
uint _Ox; // origin of the stored part
uint _Oy; // origin of the stored part
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FrsImage")
#endif
};
//

View file

@ -13,9 +13,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -63,9 +61,7 @@ class ImagePyramid {
return _levels.size();
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ImagePyramid")
#endif
};
class GaussianPyramid : public ImagePyramid {

View file

@ -9,9 +9,7 @@
* \brief Class to define the drawing style of a node
*/
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -85,9 +83,7 @@ class DrawingStyle {
float PointSize;
bool LightingEnabled;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:DrawingStyle")
#endif
};
DrawingStyle::DrawingStyle(const DrawingStyle &iBrother)

View file

@ -11,9 +11,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -303,9 +301,7 @@ class FrsMaterial {
float Shininess;
int Priority;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FrsMaterial")
#endif
};
FrsMaterial::FrsMaterial()

View file

@ -292,9 +292,7 @@ class IndexedFaceSet : public Rep {
uint _MISize;
uint _TISize;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IndexedFaceSet")
#endif
};
} /* namespace Freestyle */

View file

@ -130,9 +130,7 @@ class LineRep : public Rep {
vector<Vec3r> _vertices;
float _width;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:LineRep")
#endif
};
} /* namespace Freestyle */

View file

@ -90,9 +90,7 @@ class Node : public BaseObject {
private:
BBox<Vec3r> _BBox;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Node")
#endif
};
} /* namespace Freestyle */

View file

@ -66,9 +66,7 @@ class NodeCamera : public Node {
CameraType camera_type_;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NodeCamera")
#endif
};
class NodeOrthographicCamera : public NodeCamera {
@ -132,9 +130,7 @@ class NodeOrthographicCamera : public NodeCamera {
double zNear_;
double zFar_;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NodeOrthographicCamera")
#endif
};
class NodePerspectiveCamera : public NodeCamera {
@ -196,9 +192,7 @@ class NodePerspectiveCamera : public NodeCamera {
NodePerspectiveCamera(
double left, double right, double bottom, double top, double zNear, double zFar);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NodePerspectiveCamera")
#endif
};
} /* namespace Freestyle */

View file

@ -83,9 +83,7 @@ class NodeDrawingStyle : public NodeGroup {
private:
DrawingStyle _DrawingStyle;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:NodeDrawingStyle")
#endif
};
} /* namespace Freestyle */

View file

@ -15,9 +15,7 @@
#include "BLI_sys_types.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -57,9 +55,7 @@ class SceneHash : public SceneVisitor {
uint32_t _sum;
uint32_t _prevSum;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneHash")
#endif
};
} /* namespace Freestyle */

View file

@ -11,9 +11,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -78,9 +76,7 @@ class SceneVisitor {
VISIT_COMPLETE_DEF(DrawingStyle)
VISIT_COMPLETE_DEF(FrsMaterial)
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneVisitor")
#endif
};
} /* namespace Freestyle */

View file

@ -21,9 +21,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -233,9 +231,7 @@ class Canvas {
void causalStyleModules(std::vector<uint> &vec, uint index = 0);
void setModified(uint index, bool iMod);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Canvas")
#endif
};
} /* namespace Freestyle */

View file

@ -90,9 +90,7 @@ class Chain : public Curve {
return _splittingId;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Chain")
#endif
};
} /* namespace Freestyle */

View file

@ -22,9 +22,7 @@
#include "../system/BaseIterator.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -334,9 +332,7 @@ class CurvePoint : public Interface0D {
Vec2d directionFredo() const;
#endif
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:CurvePoint")
#endif
};
/**********************************/
@ -583,9 +579,7 @@ class Curve : public Interface1D {
*/
virtual Interface0DIterator pointsEnd(float t = 0.0f);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Curve")
#endif
};
} /* namespace Freestyle */

View file

@ -11,9 +11,7 @@
#include "TimeStamp.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -33,9 +31,7 @@ template<class Edge> struct EdgeModifier : public unary_function<Edge, void> {
/** the () operator */
virtual void operator()(Edge &iEdge) {}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:EdgeModifier")
#endif
};
/** Modifier that sets the time stamp of an Interface1D to the time stamp of the system. */

View file

@ -12,9 +12,7 @@
#include "Canvas.h"
#include "StyleModule.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -57,9 +55,7 @@ class Module {
return canvas->getCurrentStyleModule();
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Module")
#endif
};
} /* namespace Freestyle */

View file

@ -23,9 +23,7 @@
#include "../view_map/Interface1D.h"
#include "../view_map/ViewMap.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -269,9 +267,7 @@ class Operators {
static I1DContainer *_current_set;
static StrokesContainer _current_strokes_set;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Operators")
#endif
};
} /* namespace Freestyle */

View file

@ -11,9 +11,7 @@
#include "../view_map/Functions0D.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -55,9 +53,7 @@ class UnaryPredicate0D {
*/
virtual int operator()(Interface0DIterator &it);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate0D")
#endif
};
//
@ -100,9 +96,7 @@ class BinaryPredicate0D {
*/
virtual int operator()(Interface0D &inter1, Interface0D &inter2);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate0D")
#endif
};
//

View file

@ -18,9 +18,7 @@
#include "../view_map/Functions1D.h"
#include "../view_map/Interface1D.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -62,9 +60,7 @@ class UnaryPredicate1D {
*/
virtual int operator()(Interface1D &inter);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate1D")
#endif
};
//
@ -107,9 +103,7 @@ class BinaryPredicate1D {
*/
virtual int operator()(Interface1D &inter1, Interface1D &inter2);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate1D")
#endif
};
//

View file

@ -20,9 +20,7 @@
#include "../system/FreestyleConfig.h"
#include "../system/StringUtils.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
extern "C" {
struct MTex;
@ -300,9 +298,7 @@ class StrokeAttribute {
Vec2fMap *_userAttributesVec2f;
Vec3fMap *_userAttributesVec3f;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeAttribute")
#endif
};
//
@ -458,9 +454,7 @@ class StrokeVertex : public CurvePoint {
/* interface definition */
/* inherited */
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeVertex")
#endif
};
//
@ -857,9 +851,7 @@ class Stroke : public Interface1D {
virtual Interface0DIterator pointsBegin(float t = 0.0f);
virtual Interface0DIterator pointsEnd(float t = 0.0f);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Stroke")
#endif
};
//

View file

@ -11,9 +11,7 @@
#include <deque>
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -81,9 +79,7 @@ class StrokeLayer {
_strokes.push_back(iStroke);
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeLayer")
#endif
};
} /* namespace Freestyle */

View file

@ -20,9 +20,7 @@
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
namespace Freestyle {
@ -92,9 +90,7 @@ class TextureManager {
static string _brushes_path;
uint _defaultTextureId;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:TextureManager")
#endif
};
/**********************************/
@ -122,9 +118,7 @@ class StrokeRenderer {
// static uint getTextureIndex(uint index);
static TextureManager *_textureManager;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeRenderer")
#endif
};
} /* namespace Freestyle */

View file

@ -13,9 +13,7 @@
#include "../geometry/Geom.h"
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
#include "DNA_material_types.h" // for MAX_MTEX
struct bNodeTree;
@ -113,9 +111,7 @@ class StrokeVertexRep {
Vec3r _color;
float _alpha;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeVertexRep")
#endif
};
class Strip {
@ -156,9 +152,7 @@ class Strip {
return _vertices;
}
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Strip")
#endif
};
class StrokeRep {
@ -255,9 +249,7 @@ class StrokeRep {
}
#endif
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeRep")
#endif
};
} /* namespace Freestyle */

View file

@ -12,9 +12,7 @@
#include <iostream>
#include <vector>
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#endif
#include "MEM_guardedalloc.h"
using namespace std;
@ -75,9 +73,7 @@ class StrokeShader {
*/
virtual int shade(Stroke &ioStroke) const;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeShader")
#endif
};
} /* namespace Freestyle */

Some files were not shown because too many files have changed in this diff Show more