From 1fbd45672fcb1e5bfc194712fc7d0d4847a651cd Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 19 Dec 2012 23:21:31 -0700 Subject: fix for SH-3640: Can not edit objects --- indra/newview/llscenemonitor.cpp | 6 ++++++ indra/newview/llscenemonitor.h | 1 + indra/newview/llviewerdisplay.cpp | 2 ++ 3 files changed, 9 insertions(+) diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 43f9e9208b..4872200f24 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -211,6 +211,7 @@ void LLSceneMonitor::unfreezeScene() void LLSceneMonitor::capture() { static U32 last_capture_time = 0; + if(last_capture_time == gFrameCount) { return; @@ -239,6 +240,11 @@ void LLSceneMonitor::capture() mNeedsUpdateDiff = TRUE; } +bool LLSceneMonitor::needsUpdate() const +{ + return mNeedsUpdateDiff; +} + void LLSceneMonitor::compare() { if(!mNeedsUpdateDiff) diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index ce25467a21..02e3d57d46 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -59,6 +59,7 @@ public: F32 getSamplingTime() const { return mSamplingTime;} F32 getDiffPixelRatio() const { return mDiffPixelRatio;} bool isEnabled()const {return mEnabled;} + bool needsUpdate() const; private: void freezeScene(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 270ab26149..31b2220fc8 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1228,10 +1228,12 @@ void render_ui(F32 zoom_factor, int subfield) glh_set_current_modelview(glh_copy_matrix(gGLLastModelView)); } + if(LLSceneMonitor::getInstance()->needsUpdate()) { gGL.pushMatrix(); gViewerWindow->setup2DRender(); LLSceneMonitor::getInstance()->compare(); + gViewerWindow->setup3DRender(); gGL.popMatrix(); } -- cgit v1.2.3