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>2014-10-04 19:29:09 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-11-26 17:26:20 +0300
commit3fea13ed6c0c1488b6f8a2853d76ca0872aabffd (patch)
tree63177e553bbf191659f8bc4694deaabb5edb7ce0 /source/blender/freestyle/intern/scene_graph/SceneHash.h
parent8fa55d95e43392a0e7925e1327e86220a33b4394 (diff)
Freestyle: Fix for view map caching not flashed properly in view port rendering.
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph/SceneHash.h')
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneHash.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/SceneHash.h b/source/blender/freestyle/intern/scene_graph/SceneHash.h
index 8f5f847eaab..5521b792e89 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneHash.h
+++ b/source/blender/freestyle/intern/scene_graph/SceneHash.h
@@ -26,8 +26,11 @@
*/
#include "IndexedFaceSet.h"
+#include "NodeCamera.h"
#include "SceneVisitor.h"
+#include "BLI_sys_types.h"
+
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
@@ -39,23 +42,33 @@ class SceneHash : public SceneVisitor
public:
inline SceneHash() : SceneVisitor()
{
- _hashcode = 0.0;
+ _sum = 1;
}
virtual ~SceneHash() {}
+ VISIT_DECL(NodeCamera)
VISIT_DECL(IndexedFaceSet)
- inline real getValue() {
- return _hashcode;
+ string toString();
+
+ inline bool match() {
+ return _sum == _prevSum;
+ }
+
+ inline void store() {
+ _prevSum = _sum;
}
inline void reset() {
- _hashcode = 0.0;
+ _sum = 1;
}
private:
- real _hashcode;
+ void adler32(unsigned char *data, int size);
+
+ uint32_t _sum;
+ uint32_t _prevSum;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneHash")