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

Unified Diff: core/cross/client.cc

Issue 151103: Changed way Packs cannot be created if there is no Renderer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 6 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 | « core/cross/client.h ('k') | core/cross/object_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/client.cc
===================================================================
--- core/cross/client.cc (revision 19521)
+++ core/cross/client.cc (working copy)
@@ -116,11 +116,8 @@
// Assigns a Renderer to the Client, and also assigns the Client
// to the Renderer and sets up the default render graph
void Client::Init() {
- if (!renderer_.IsAvailable()) {
- // Don't allow packs to be created.
- object_manager_->DisallowPackCreation();
+ if (!renderer_.IsAvailable())
return;
- }
// Create the root node for the scenegraph. Note that the root lives
// outside of a pack object. The root's lifetime is directly bound to that
@@ -144,6 +141,15 @@
counter_manager_.ClearAllCallbacks();
}
+Pack* Client::CreatePack() {
+ if (!renderer_.IsAvailable()) {
+ O3D_ERROR(service_locator_) << "Pack creation not allowed";
gman 2009/06/30 21:32:11 How about changing this message to "No Renderer av
+ return NULL;
+ }
+
+ return object_manager_->CreatePack();
+}
+
// Tick Methods ----------------------------------------------------------------
void Client::SetTickCallback(
« no previous file with comments | « core/cross/client.h ('k') | core/cross/object_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698