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

Unified Diff: samples/o3djs/util.js

Issue 155716: o3djs.utils.makeClients checks that Renderer has been initialized.... (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/util.js
===================================================================
--- samples/o3djs/util.js (revision 20972)
+++ samples/o3djs/util.js (working copy)
@@ -853,7 +853,10 @@
for (var cc = 0; cc < clientElements.length; ++cc) {
var element = clientElements[cc];
o3d = element.o3d;
- if (!o3d) {
+ var status = element.client && element.client.rendererInitStatus;
+ var ready = o3d && status >
+ o3djs.util.rendererInitStatus.UNINITIALIZED;
+ if (!ready) {
if (chromeWorkaround) {
if (element.style.width != '100%') {
element.style.width = '100%';
@@ -868,7 +871,6 @@
element.style.width = '100%';
return;
}
- var status = clientElements[cc].client.rendererInitStatus;
// keep the highest status. This is the worst status.
if (status > initStatus) {
initStatus = status;
« 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