From 943789b53ac3f2750cb71dca6facc0de7fa39539 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 23 Nov 2011 12:11:53 -0800 Subject: SH-2710 FIX -- Removed calls to getChild happening every frame and during idle calls. Reviewed by davep. --- indra/newview/lldebugview.cpp | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'indra/newview/lldebugview.cpp') diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index ba511a3693..92ac336d0d 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -55,9 +55,30 @@ LLDebugView* gDebugView = NULL; static LLDefaultChildRegistry::Register r("debug_view"); LLDebugView::LLDebugView(const LLDebugView::Params& p) -: LLView(p) +: LLView(p), + mFastTimerView(NULL), + mMemoryView(NULL), + mDebugConsolep(NULL), + mFloaterSnapRegion(NULL) {} +LLDebugView::~LLDebugView() +{ + // These have already been deleted. Fix the globals appropriately. + gDebugView = NULL; + gTextureView = NULL; + gSceneView = NULL; + gTextureSizeView = NULL; + gTextureCategoryView = NULL; +} + +BOOL LLDebugView::postBuild() +{ + mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region"); + + return TRUE; +} + void LLDebugView::init() { LLRect r; @@ -109,8 +130,6 @@ void LLDebugView::init() addChild(gTextureView); //gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE); - - if(gAuditTexture) { @@ -136,22 +155,10 @@ void LLDebugView::init() } } - -LLDebugView::~LLDebugView() -{ - // These have already been deleted. Fix the globals appropriately. - gDebugView = NULL; - gTextureView = NULL; - gSceneView = NULL; - gTextureSizeView = NULL; - gTextureCategoryView = NULL; -} - void LLDebugView::draw() { - LLView* floater_snap_region = getRootView()->getChildView("floater_snap_region"); LLRect debug_rect; - floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &debug_rect, getParent()); + mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &debug_rect, getParent()); setShape(debug_rect); LLView::draw(); -- cgit v1.2.3 From b5346c6b64ce955ed71ddc6f64bc7a864111a8e4 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 1 Dec 2011 15:46:39 -0800 Subject: SH-2726 FIX -- Texture Console and Debug Console inaccessable * Removed debug view post build step and moved initialization to first draw for proper setup. --- indra/newview/lldebugview.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview/lldebugview.cpp') diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 92ac336d0d..7d3170cb76 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -72,13 +72,6 @@ LLDebugView::~LLDebugView() gTextureCategoryView = NULL; } -BOOL LLDebugView::postBuild() -{ - mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region"); - - return TRUE; -} - void LLDebugView::init() { LLRect r; @@ -157,6 +150,11 @@ void LLDebugView::init() void LLDebugView::draw() { + if (mFloaterSnapRegion == NULL) + { + mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region"); + } + LLRect debug_rect; mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &debug_rect, getParent()); -- cgit v1.2.3