]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
This commit was generated by cvs2git to create tag mergeto_BR_Dev_For_4_0_21May07
authoradmin <salome-admin@opencascade.com>
Mon, 21 May 2007 08:13:39 +0000 (08:13 +0000)
committeradmin <salome-admin@opencascade.com>
Mon, 21 May 2007 08:13:39 +0000 (08:13 +0000)
'mergeto_BR_Dev_For_4_0_21May07'.

Sprout from BR_mergefrom_BR_Dev_For_4_0 2007-05-21 08:13:38 UTC apo <apo@opencascade.com> 'To fix problem with MED module interaction'
Cherrypick from BR_mergefrom_BR_Dev_For_4_0 2007-05-15 06:56:10 UTC apo <apo@opencascade.com> 'To customize "shrink" functionality for the presentations':
    resources/Makefile.am
    src/PIPELINE/VISU_PipeLine.cxx
    src/PIPELINE/VISU_PipeLine.hxx

resources/Makefile.am
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx

index 61ac45c295729803a21a655a8c4b7d39ffc131c3..5cf88e8c0034c8fe791332b92434881cbee3de32 100644 (file)
@@ -84,10 +84,6 @@ Visu_tree_gauss_points.png \
 Visu_tree_isosurfaces_gr.png \
 Visu_tree_isosurfaces.png \
 Visu_tree_mesh.png \
-Visu_tree_multipr_full.png \
-Visu_tree_multipr_hide.png \
-Visu_tree_multipr_low.png \
-Visu_tree_multipr_medium.png \
 Visu_tree_plot3d_gr.png \
 Visu_tree_plot3d.png \
 Visu_tree_result.png \
@@ -112,6 +108,6 @@ Visu_slider_play.png \
 Visu_slider_pause.png \
 Visu_slider_next.png \
 Visu_slider_last.png
-
+        
 EXTRA_DIST+= VISUCatalog.xml.in
 nodist_salomeres_DATA=VISUCatalog.xml
index 06661f017aa686815df71663c4ec3aa63d8b8e22..0b8b845a211146b8d955e0e922ecb27c815731e5 100644 (file)
@@ -393,14 +393,13 @@ VISU_PipeLine
 //----------------------------------------------------------------------------
 size_t
 VISU_PipeLine
-::CheckAvailableMemory(double theSize)
+::CheckAvailableMemory(size_t theSize)
 {
   if(theSize < ULONG_MAX){
     try{
-      size_t aSize = size_t(theSize);
-      if(char *aCheck = new char[aSize]){
+      if(char *aCheck = new char[theSize]){
        delete [] aCheck;
-       return aSize;
+       return theSize;
       }
     }catch(std::bad_alloc& exc){
     }catch(...){
@@ -417,19 +416,19 @@ VISU_PipeLine
                     size_t theMinSize)
 {
   // Finds acceptable memory size by half-deflection methods
-  static double EPSILON = 2 * 1024;
-  double aMax = std::max(theSize, theMinSize);
-  double aMin = std::min(theSize, theMinSize);
+  static size_t EPSILON = 2 * 1024;
+  size_t aMax = std::max(theSize, theMinSize);
+  size_t aMin = std::min(theSize, theMinSize);
   //cout<<"GetAvailableMemory - "<<aMax<<"; "<<aMin;
-  while(!CheckAvailableMemory(aMax) && CheckAvailableMemory(aMin) && (aMax - aMin) > EPSILON){
-    double aRoot = (aMax + aMin) / 2.;
+  while(CheckAvailableMemory(aMax) == 0 && CheckAvailableMemory(aMin) > 0 && (aMax - aMin) > EPSILON){
+    size_t aRoot = (aMax + aMin) / 2;
     if(CheckAvailableMemory(aRoot))
       aMin = aRoot;
     else
       aMax = aRoot;
   }
   //cout<<"; "<<aMax<<endl;
-  return (size_t)aMax;
+  return aMax;
 }
 
 
index 5301593714de39a4d3468f01f40db3f3edee2cbd..3590ae9c7b6c1ec08a486be653fb2fc5c4f5ec95 100644 (file)
@@ -174,8 +174,8 @@ public:
   //----------------------------------------------------------------------------
   static
   size_t
-  CheckAvailableMemory(double theSize);
-
+  CheckAvailableMemory(size_t theSize);
+  
   static
   size_t
   GetAvailableMemory(size_t theSize,