Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(675)

Unified Diff: src/liboslexec/shadingsys.cpp

Issue 195042: Review: bind refactor (Closed) Base URL: http://openshadinglanguage.googlecode.com/svn/trunk/
Patch Set: Updated diff Created 14 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/liboslexec/oslexec_pvt.h ('k') | src/testshade/testshade.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liboslexec/shadingsys.cpp
===================================================================
--- src/liboslexec/shadingsys.cpp (revision 548)
+++ src/liboslexec/shadingsys.cpp (working copy)
@@ -126,7 +126,7 @@
ErrorHandler *err)
: m_renderer(renderer), m_texturesys(texturesystem), m_err(err),
m_statslevel (0), m_debug (false), m_lazylayers (true),
- m_clearmemory (false),
+ m_clearmemory (false), m_rebind (false),
m_commonspace_synonym("world"),
m_in_group (false),
m_global_heap_total (0)
@@ -139,6 +139,7 @@
m_layers_executed_uncond = 0;
m_layers_executed_lazy = 0;
m_layers_executed_never = 0;
+ m_stat_rebinds = 0;
init_global_heap_offsets ();
@@ -203,6 +204,10 @@
m_clearmemory = *(const int *)val;
return true;
}
+ if (name == "rebind" && type == TypeDesc::INT) {
+ m_rebind = *(const int *)val;
+ return true;
+ }
if (name == "commonspace" && type == TypeDesc::STRING) {
m_commonspace_synonym = ustring (*(const char **)val);
return true;
@@ -237,6 +242,10 @@
*(int *)val = m_clearmemory;
return true;
}
+ if (name == "rebind" && type == TypeDesc::INT) {
+ *(int *)val = m_rebind;
+ return true;
+ }
return false;
}
@@ -375,6 +384,10 @@
(long long)m_layers_executed_never,
(100.0*m_layers_executed_never)/totalexec);
+ out << Strutil::format (" Rebinds: %lld / %lld (%.1f%%)\n",
+ (long long)m_stat_rebinds, totalexec,
+ (100.0*m_stat_rebinds)/totalexec);
+
out << " Regex's compiled: " << m_stat_regexes << "\n";
return out.str();
« no previous file with comments | « src/liboslexec/oslexec_pvt.h ('k') | src/testshade/testshade.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b