diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 01:27:00 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 01:27:00 +0000 |
commit | 7624db8ec35fbfe5ed12a876957bd53c37860fbf (patch) | |
tree | 65d23db39e2b1855fe92e89d58d5e36bfe347ed3 | |
parent | 3c2216cd87438196389b5076095a5f1d627b1ca2 (diff) | |
download | chromium_src-7624db8ec35fbfe5ed12a876957bd53c37860fbf.zip chromium_src-7624db8ec35fbfe5ed12a876957bd53c37860fbf.tar.gz chromium_src-7624db8ec35fbfe5ed12a876957bd53c37860fbf.tar.bz2 |
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
-rw-r--r-- | o3d/samples/o3djs/dump.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/o3d/samples/o3djs/dump.js b/o3d/samples/o3djs/dump.js index 5989c52e..c484fc0 100644 --- a/o3d/samples/o3djs/dump.js +++ b/o3d/samples/o3djs/dump.js @@ -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); } |