Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: samples/o3djs/dump.js

Issue 149297: Change dump.js to show render nodes sorted by priority. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3djs/dump.js
===================================================================
--- samples/o3djs/dump.js (revision 20010)
+++ samples/o3djs/dump.js (working copy)
@@ -316,6 +316,13 @@
} 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.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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698