Commit 7624db8e authored by gman@google.com's avatar gman@google.com

Change dump.js to show render nodes sorted by priority.


Review URL: http://codereview.chromium.org/149297

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20114 0039d316-1c4b-4281-b951-d872f2087c98
parent 3c2216cd
......@@ -316,6 +316,13 @@ o3djs.dump.getParamValueAsString = function(param, opt_prefix) {
} else if (param.isAClassName('o3d.ParamDrawList')) {
value = param.value;
value = 'drawlist : "' + (value ? value.name : 'NULL') + '"';
} else if (param.isAClassName('o3d.ParamRenderSurface')) {
value = param.value;
value = 'renderSurface : "' + (value ? value.name : 'NULL') + '"';
} else if (param.isAClassName('o3d.ParamRenderDepthStencilSurface')) {
value = param.value;
value = 'renderDepthStencilSurface: "' + (value ? value.name : 'NULL') +
'"';
} else if (param.isAClassName('o3d.ParamDrawContext')) {
value = param.value;
value = 'drawcontext : "' + (value ? value.name : 'NULL') + '"';
......@@ -576,7 +583,10 @@ o3djs.dump.dumpRenderNodeTree = function(render_node, opt_prefix) {
o3djs.dump.dumpRenderNode(render_node, opt_prefix);
var child_prefix = opt_prefix + ' ';
var children = render_node.children;
// Get the list of children sorted by priority.
var children = render_node.children.sort(function(a, b) {
return a.priority - b.priority;
});
for (var c = 0; c < children.length; c++) {
o3djs.dump.dumpRenderNodeTree(children[c], child_prefix);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment