[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38784] branches/soc-2011-salad: Merging r38707 through r38783 from soc-2011-tomato into soc-2011-saald
Sergey Sharybin
g.ulairi at gmail.com
Thu Jul 28 13:33:34 CEST 2011
Revision: 38784
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38784
Author: nazgul
Date: 2011-07-28 11:33:34 +0000 (Thu, 28 Jul 2011)
Log Message:
-----------
Merging r38707 through r38783 from soc-2011-tomato into soc-2011-saald
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38707
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38783
Modified Paths:
--------------
branches/soc-2011-salad/extern/libmv/libmv-capi.cpp
branches/soc-2011-salad/intern/memutil/MEM_CacheLimiter.h
branches/soc-2011-salad/intern/memutil/MEM_CacheLimiterC-Api.h
branches/soc-2011-salad/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-salad/source/blender/blenkernel/BKE_moviecache.h
branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c
branches/soc-2011-salad/source/blender/blenkernel/intern/moviecache.c
branches/soc-2011-salad/source/blender/blenkernel/intern/seqcache.c
branches/soc-2011-salad/source/blender/editors/interface/interface_templates.c
branches/soc-2011-salad/source/blender/editors/space_clip/clip_buttons.c
branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c
branches/soc-2011-salad/source/blender/editors/space_clip/clip_editor.c
branches/soc-2011-salad/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-salad/source/blender/editors/space_clip/tracking_ops.c
branches/soc-2011-salad/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-salad/source/blender/editors/space_view3d/space_view3d.c
branches/soc-2011-salad/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-salad/source/blender/imbuf/intern/allocimbuf.c
Property Changed:
----------------
branches/soc-2011-salad/
branches/soc-2011-salad/intern/audaspace/OpenAL/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38706
/trunk/blender:36834-38779
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38783
/trunk/blender:36834-38779
Modified: branches/soc-2011-salad/extern/libmv/libmv-capi.cpp
===================================================================
--- branches/soc-2011-salad/extern/libmv/libmv-capi.cpp 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/extern/libmv/libmv-capi.cpp 2011-07-28 11:33:34 UTC (rev 38784)
@@ -70,9 +70,10 @@
void libmv_initLogging(const char *argv0)
{
google::InitGoogleLogging(argv0);
- google::SetCommandLineOption("logtostderr", "0");
+ google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "0");
google::SetCommandLineOption("stderrthreshold", "7");
+ google::SetCommandLineOption("minloglevel", "7");
V3D::optimizerVerbosenessLevel = 0;
}
@@ -80,7 +81,8 @@
{
google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "0");
- google::SetCommandLineOption("stderrthreshold", "2");
+ google::SetCommandLineOption("stderrthreshold", "1");
+ google::SetCommandLineOption("minloglevel", "0");
V3D::optimizerVerbosenessLevel = 1;
}
Property changes on: branches/soc-2011-salad/intern/audaspace/OpenAL
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38706
/trunk/blender/intern/audaspace/OpenAL:36834-38779
+ /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38783
/trunk/blender/intern/audaspace/OpenAL:36834-38779
Modified: branches/soc-2011-salad/intern/memutil/MEM_CacheLimiter.h
===================================================================
--- branches/soc-2011-salad/intern/memutil/MEM_CacheLimiter.h 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/intern/memutil/MEM_CacheLimiter.h 2011-07-28 11:33:34 UTC (rev 38784)
@@ -126,6 +126,10 @@
public:
typedef typename std::list<MEM_CacheLimiterHandle<T> *,
MEM_Allocator<MEM_CacheLimiterHandle<T> *> >::iterator iterator;
+ typedef intptr_t (*MEM_CacheLimiter_DataSize_Func) (void *data);
+ MEM_CacheLimiter(MEM_CacheLimiter_DataSize_Func getDataSize_)
+ : getDataSize(getDataSize_) {
+ }
~MEM_CacheLimiter() {
for (iterator it = queue.begin(); it != queue.end(); it++) {
delete *it;
@@ -144,17 +148,36 @@
}
void enforce_limits() {
intptr_t max = MEM_CacheLimiter_get_maximum();
- intptr_t mem_in_use= MEM_get_memory_in_use();
- intptr_t mmap_in_use= MEM_get_mapped_memory_in_use();
+ intptr_t mem_in_use, cur_size;
if (max == 0) {
return;
}
+
+ if(getDataSize) {
+ mem_in_use = total_size();
+ } else {
+ mem_in_use = MEM_get_memory_in_use();
+ }
+
for (iterator it = queue.begin();
- it != queue.end() && mem_in_use + mmap_in_use > max;) {
+ it != queue.end() && mem_in_use > max;) {
iterator jt = it;
++it;
+
+ if(getDataSize) {
+ cur_size= getDataSize((*jt)->get()->get_data());
+ } else {
+ cur_size= mem_in_use;
+ }
+
(*jt)->destroy_if_possible();
+
+ if(getDataSize) {
+ mem_in_use-= cur_size;
+ } else {
+ mem_in_use-= cur_size - MEM_get_memory_in_use();
+ }
}
}
void touch(MEM_CacheLimiterHandle<T> * handle) {
@@ -165,8 +188,17 @@
handle->me = it;
}
private:
+ intptr_t total_size() {
+ intptr_t size = 0;
+ for (iterator it = queue.begin(); it != queue.end(); it++) {
+ size+= getDataSize((*it)->get()->get_data());
+ }
+ return size;
+ }
+
std::list<MEM_CacheLimiterHandle<T>*,
MEM_Allocator<MEM_CacheLimiterHandle<T> *> > queue;
+ MEM_CacheLimiter_DataSize_Func getDataSize;
};
#endif // MEM_CACHELIMITER_H
Modified: branches/soc-2011-salad/intern/memutil/MEM_CacheLimiterC-Api.h
===================================================================
--- branches/soc-2011-salad/intern/memutil/MEM_CacheLimiterC-Api.h 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/intern/memutil/MEM_CacheLimiterC-Api.h 2011-07-28 11:33:34 UTC (rev 38784)
@@ -42,6 +42,9 @@
/* function used to remove data from memory */
typedef void(*MEM_CacheLimiter_Destruct_Func)(void*);
+/* function used to measure stored data element size */
+typedef intptr_t(*MEM_CacheLimiter_DataSize_Func) (void*);
+
#ifndef MEM_CACHELIMITER_H
extern void MEM_CacheLimiter_set_maximum(int m);
extern int MEM_CacheLimiter_get_maximum(void);
@@ -55,7 +58,8 @@
*/
extern MEM_CacheLimiterC * new_MEM_CacheLimiter(
- MEM_CacheLimiter_Destruct_Func data_destructor);
+ MEM_CacheLimiter_Destruct_Func data_destructor,
+ MEM_CacheLimiter_DataSize_Func data_size);
/**
* Delete MEM_CacheLimiter
Modified: branches/soc-2011-salad/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
===================================================================
--- branches/soc-2011-salad/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp 2011-07-28 11:33:34 UTC (rev 38784)
@@ -54,8 +54,8 @@
class MEM_CacheLimiterCClass {
public:
- MEM_CacheLimiterCClass(MEM_CacheLimiter_Destruct_Func data_destructor_)
- : data_destructor(data_destructor_) {
+ MEM_CacheLimiterCClass(MEM_CacheLimiter_Destruct_Func data_destructor_, MEM_CacheLimiter_DataSize_Func data_size)
+ : data_destructor(data_destructor_), cache(data_size) {
}
~MEM_CacheLimiterCClass();
@@ -142,10 +142,12 @@
}
MEM_CacheLimiterC * new_MEM_CacheLimiter(
- MEM_CacheLimiter_Destruct_Func data_destructor)
+ MEM_CacheLimiter_Destruct_Func data_destructor,
+ MEM_CacheLimiter_DataSize_Func data_size)
{
return (MEM_CacheLimiterC*) new MEM_CacheLimiterCClass(
- data_destructor);
+ data_destructor,
+ data_size);
}
void delete_MEM_CacheLimiter(MEM_CacheLimiterC * This)
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py 2011-07-28 11:33:34 UTC (rev 38784)
@@ -111,6 +111,7 @@
sub.menu("CLIP_MT_track")
layout.template_ID(sc, "clip")
+ layout.template_running_jobs()
class CLIP_PT_tools(bpy.types.Panel):
Modified: branches/soc-2011-salad/source/blender/blenkernel/BKE_moviecache.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/BKE_moviecache.h 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_moviecache.h 2011-07-28 11:33:34 UTC (rev 38784)
@@ -45,6 +45,9 @@
typedef void (*MovieCacheGetKeyDataFP) (void *userkey, int *framenr);
+void BKE_moviecache_init(void);
+void BKE_moviecache_destruct(void);
+
struct MovieCache *BKE_moviecache_create(int keysize, GHashHashFP hashfp, GHashCmpFP cmpfp, MovieCacheGetKeyDataFP getdatafp);
void BKE_moviecache_put(struct MovieCache *cache, void *userkey, struct ImBuf *ibuf);
struct ImBuf* BKE_moviecache_get(struct MovieCache *cache, void *userkey);
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c 2011-07-28 11:33:34 UTC (rev 38784)
@@ -82,6 +82,7 @@
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_sequencer.h"
+#include "BKE_moviecache.h"
#include "BLO_undofile.h"
@@ -115,6 +116,7 @@
BLI_cb_finalize();
seq_stripelem_cache_destruct();
+ BKE_moviecache_destruct();
free_nodesystem();
}
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/moviecache.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/moviecache.c 2011-07-28 11:16:10 UTC (rev 38783)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/moviecache.c 2011-07-28 11:33:34 UTC (rev 38784)
@@ -32,6 +32,7 @@
*/
#include "MEM_guardedalloc.h"
+#include "MEM_CacheLimiterC-Api.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
@@ -42,6 +43,8 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
+static MEM_CacheLimiterC *limitor= NULL;
+
typedef struct MovieCache {
GHash *hash;
GHashHashFP hashfp;
@@ -66,6 +69,7 @@
typedef struct MovieCacheItem {
MovieCache *cache_owner;
ImBuf *ibuf;
+ MEM_CacheLimiterHandleC * c_handle;
unsigned long last_access;
} MovieCacheItem;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list