diff options
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
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(); } |