summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llcommon/CMakeLists.txt1
-rwxr-xr-xindra/llcommon/llerror.cpp8
-rwxr-xr-xindra/llcommon/llerror.h3
-rw-r--r--indra/llcommon/lltraceaccumulators.cpp2
-rw-r--r--indra/llcommon/lltraceaccumulators.h1
-rw-r--r--indra/llcommon/llunit.h16
-rwxr-xr-xindra/llcommon/tests/llleap_test.cpp3
-rwxr-xr-xindra/llcommon/tests/llprocess_test.cpp12
-rwxr-xr-xindra/llcommon/tests/llsdserialize_test.cpp4
-rw-r--r--indra/llcommon/tests/lltrace_test.cpp141
-rwxr-xr-xindra/newview/llappviewer.cpp2
-rwxr-xr-xindra/newview/lldrawable.cpp16
-rwxr-xr-xindra/newview/lldrawable.h1
-rw-r--r--indra/newview/llvieweroctree.cpp2
-rw-r--r--indra/newview/llvieweroctree.h3
-rwxr-xr-xindra/newview/llvocache.cpp57
-rwxr-xr-xindra/newview/llvocache.h13
-rwxr-xr-xindra/test/manageapr.h46
18 files changed, 226 insertions, 105 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 4336550d07..62880b07f6 100755
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -287,6 +287,7 @@ if (LL_TESTS)
LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
+ LL_ADD_INTEGRATION_TEST(lltrace "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llunits "" "${test_libs}")
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 1b1aada8c1..a51f8f216a 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -926,6 +926,7 @@ namespace
std::ostringstream message_stream;
+ const_cast<LLError::CallSite&>(site).mTagString += " ";
if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s.mPrintLocation))
{
message_stream << site.mLocationString << " ";
@@ -953,7 +954,8 @@ namespace
message_stream << message;
- r->recordMessage(level, message_stream.str());
+ std::string final_message = message_stream.str();
+ r->recordMessage(level, final_message);
}
}
}
@@ -1157,6 +1159,10 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
+ //const_cast<CallSite&>(site).mTagString += " ";
+ std::string tag_string = site.mTagString;
+ tag_string += " ";
+
std::string message = out->str();
if (out == &g.messageStream)
{
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 88e5dfdcf1..0d6f1810d2 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -302,7 +302,8 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// See top of file for common usage.
/////////////////////////////////
-// this macro uses a one-shot do statement to avoid parsing errors when writing:
+// this macro uses a one-shot do statement to avoid parsing errors when writing control flow statements
+// without braces:
// if (condition) LL_INFOS() << "True" << LLENDL; else LLINFOS() << "False" << LLENDL
#define lllog(level, once, ...) \
diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp
index 5e25ad6b26..42f075a7cb 100644
--- a/indra/llcommon/lltraceaccumulators.cpp
+++ b/indra/llcommon/lltraceaccumulators.cpp
@@ -192,7 +192,7 @@ void SampleAccumulator::reset( const SampleAccumulator* other )
mMin = mLastValue;
mMax = mLastValue;
mMean = mLastValue;
- LL_ERRS_IF(mHasValue && !(mMean < 0) && !(mMean >= 0)) << "Invalid mean after capturing value" << LL_ENDL;
+ llassert(!mHasValue || mMean < 0 || mMean >= 0);
mSumOfSquares = 0;
mLastSampleTimeStamp = LLTimer::getTotalSeconds();
mTotalSamplingTime = 0;
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index d4ff4b8d71..bf195f72b1 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -342,6 +342,7 @@ namespace LLTrace
mSum += mLastValue * delta_time;
mTotalSamplingTime += delta_time;
F64 old_mean = mMean;
+ llassert(mMean < 0 || mMean >= 0);
mMean += (delta_time / mTotalSamplingTime) * (mLastValue - old_mean);
llassert(mMean < 0 || mMean >= 0);
mSumOfSquares += delta_time * (mLastValue - old_mean) * (mLastValue - mMean);
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index 1ef4924578..0081b51f84 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -593,9 +593,6 @@ struct LLUnitLinearOps
mDivisor(1)
{}
- T mValue;
- T mDivisor;
-
template<typename OTHER_T>
self_t operator * (OTHER_T other)
{
@@ -612,6 +609,7 @@ struct LLUnitLinearOps
template<typename OTHER_T>
self_t operator + (OTHER_T other)
{
+ mValue /= mDivisor;
mValue += other;
return *this;
}
@@ -619,9 +617,13 @@ struct LLUnitLinearOps
template<typename OTHER_T>
self_t operator - (OTHER_T other)
{
+ mValue /= mDivisor;
mValue -= other;
return *this;
}
+
+ T mValue;
+ T mDivisor;
};
template<typename T>
@@ -634,9 +636,6 @@ struct LLUnitInverseLinearOps
mDivisor(1)
{}
- T mValue;
- T mDivisor;
-
template<typename OTHER_T>
self_t operator * (OTHER_T other)
{
@@ -654,6 +653,7 @@ struct LLUnitInverseLinearOps
template<typename OTHER_T>
self_t operator + (OTHER_T other)
{
+ mValue /= mDivisor;
mValue -= other;
return *this;
}
@@ -661,9 +661,13 @@ struct LLUnitInverseLinearOps
template<typename OTHER_T>
self_t operator - (OTHER_T other)
{
+ mValue /= mDivisor;
mValue += other;
return *this;
}
+
+ T mValue;
+ T mDivisor;
};
#define LL_DECLARE_BASE_UNIT(base_unit_name, unit_label) \
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp
index 29060d4ef5..9ea822cb8d 100755
--- a/indra/llcommon/tests/llleap_test.cpp
+++ b/indra/llcommon/tests/llleap_test.cpp
@@ -22,7 +22,6 @@
// other Linden headers
#include "../test/lltut.h"
#include "../test/namedtempfile.h"
-#include "../test/manageapr.h"
#include "../test/catch_and_store_what_in.h"
#include "wrapllerrs.h"
#include "llevents.h"
@@ -33,8 +32,6 @@
using boost::assign::list_of;
-static ManageAPR manager;
-
StringVec sv(const StringVec& listof) { return listof; }
#if defined(LL_WINDOWS)
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index f188865eb0..709a095105 100755
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -29,7 +29,6 @@
//#include <boost/lambda/bind.hpp>
// other Linden headers
#include "../test/lltut.h"
-#include "../test/manageapr.h"
#include "../test/namedtempfile.h"
#include "../test/catch_and_store_what_in.h"
#include "stringize.h"
@@ -46,9 +45,12 @@
#endif
//namespace lambda = boost::lambda;
-
-// static instance of this manages APR init/cleanup
-static ManageAPR manager;
+ std::string apr_strerror_helper(apr_status_t rv)
+{
+ char errbuf[256];
+ apr_strerror(rv, errbuf, sizeof(errbuf));
+ return errbuf;
+}
/*****************************************************************************
* Helpers
@@ -60,7 +62,7 @@ static ManageAPR manager;
#define aprchk(expr) aprchk_(#expr, (expr))
static void aprchk_(const char* call, apr_status_t rv, apr_status_t expected=APR_SUCCESS)
{
- tut::ensure_equals(STRINGIZE(call << " => " << rv << ": " << manager.strerror(rv)),
+ tut::ensure_equals(STRINGIZE(call << " => " << rv << ": " << apr_strerror_helper(rv)),
rv, expected);
}
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 235008a5ae..b5893135ea 100755
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -56,12 +56,9 @@ namespace lambda = boost::lambda;
#include "../llformat.h"
#include "../test/lltut.h"
-#include "../test/manageapr.h"
#include "../test/namedtempfile.h"
#include "stringize.h"
-static ManageAPR manager;
-
std::vector<U8> string_to_vector(const std::string& str)
{
return std::vector<U8>(str.begin(), str.end());
@@ -1723,5 +1720,6 @@ namespace tut
"This string\n"
"has several\n"
"lines.");
+
}
}
diff --git a/indra/llcommon/tests/lltrace_test.cpp b/indra/llcommon/tests/lltrace_test.cpp
new file mode 100644
index 0000000000..1c2a4528ae
--- /dev/null
+++ b/indra/llcommon/tests/lltrace_test.cpp
@@ -0,0 +1,141 @@
+/**
+ * @file llsingleton_test.cpp
+ * @date 2011-08-11
+ * @brief Unit test for the LLSingleton class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "lltrace.h"
+#include "lltracethreadrecorder.h"
+#include "lltracerecording.h"
+#include "../test/lltut.h"
+
+namespace LLUnits
+{
+ // using powers of 2 to allow strict floating point equality
+ LL_DECLARE_BASE_UNIT(Ounces, "oz");
+ LL_DECLARE_DERIVED_UNIT(Ounces, * 12, TallCup, "");
+ LL_DECLARE_DERIVED_UNIT(Ounces, * 16, GrandeCup, "");
+ LL_DECLARE_DERIVED_UNIT(Ounces, * 20, VentiCup, "");
+
+ LL_DECLARE_BASE_UNIT(Grams, "g");
+ LL_DECLARE_DERIVED_UNIT(Grams, / 1000, Milligrams, "mg");
+}
+
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, Ounces);
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, TallCup);
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, GrandeCup);
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, VentiCup);
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, Grams);
+LL_DECLARE_UNIT_TYPEDEFS(LLUnits, Milligrams);
+
+
+namespace tut
+{
+ using namespace LLTrace;
+ struct trace
+ {
+ ThreadRecorder mRecorder;
+ };
+
+ typedef test_group<trace> trace_t;
+ typedef trace_t::object trace_object_t;
+ tut::trace_t tut_singleton("LLTrace");
+
+ static CountStatHandle<S32> sCupsOfCoffeeConsumed("coffeeconsumed", "Delicious cup of dark roast.");
+ static SampleStatHandle<F32Milligrams> sCaffeineLevelStat("caffeinelevel", "Coffee buzz quotient");
+ static EventStatHandle<S32Ounces> sOuncesPerCup("cupsize", "Large, huge, or ginormous");
+
+ static F32 sCaffeineLevel(0.f);
+ const F32Milligrams sCaffeinePerOz(18.f);
+
+ void drink_coffee(S32 num_cups, S32Ounces cup_size)
+ {
+ add(sCupsOfCoffeeConsumed, num_cups);
+ for (S32 i = 0; i < num_cups; i++)
+ {
+ record(sOuncesPerCup, cup_size);
+ }
+
+ sCaffeineLevel += F32Ounces(num_cups * cup_size).value() * sCaffeinePerOz.value();
+ sample(sCaffeineLevelStat, sCaffeineLevel);
+ }
+
+ // basic data collection
+ template<> template<>
+ void trace_object_t::test<1>()
+ {
+ sample(sCaffeineLevelStat, sCaffeineLevel);
+
+ Recording all_day;
+ Recording at_work;
+ Recording after_3pm;
+
+ all_day.start();
+ {
+ // warm up with one grande cup
+ drink_coffee(1, S32TallCup(1));
+
+ // go to work
+ at_work.start();
+ {
+ // drink 3 tall cups, 1 after 3 pm
+ drink_coffee(2, S32GrandeCup(1));
+ after_3pm.start();
+ drink_coffee(1, S32GrandeCup(1));
+ }
+ at_work.stop();
+ drink_coffee(1, S32VentiCup(1));
+ }
+ after_3pm.stop();
+ all_day.stop();
+
+ ensure("count stats are counted when recording is active",
+ at_work.getSum(sCupsOfCoffeeConsumed) == 3
+ && all_day.getSum(sCupsOfCoffeeConsumed) == 5
+ && after_3pm.getSum(sCupsOfCoffeeConsumed) == 2);
+ ensure("measurement sums are counted when recording is active",
+ at_work.getSum(sOuncesPerCup) == S32Ounces(48)
+ && all_day.getSum(sOuncesPerCup) == S32Ounces(80)
+ && after_3pm.getSum(sOuncesPerCup) == S32Ounces(36));
+ ensure("measurement min is specific to when recording is active",
+ at_work.getMin(sOuncesPerCup) == S32GrandeCup(1)
+ && all_day.getMin(sOuncesPerCup) == S32TallCup(1)
+ && after_3pm.getMin(sOuncesPerCup) == S32GrandeCup(1));
+ ensure("measurement max is specific to when recording is active",
+ at_work.getMax(sOuncesPerCup) == S32GrandeCup(1)
+ && all_day.getMax(sOuncesPerCup) == S32VentiCup(1)
+ && after_3pm.getMax(sOuncesPerCup) == S32VentiCup(1));
+ ensure("sample min is specific to when recording is active",
+ at_work.getMin(sCaffeineLevelStat) == sCaffeinePerOz * ((S32Ounces)S32TallCup(1)).value()
+ && all_day.getMin(sCaffeineLevelStat) == F32Milligrams(0.f)
+ && after_3pm.getMin(sCaffeineLevelStat) == sCaffeinePerOz * ((S32Ounces)S32TallCup(1) + (S32Ounces)S32GrandeCup(2)).value());
+ ensure("sample max is specific to when recording is active",
+ at_work.getMax(sCaffeineLevelStat) == sCaffeinePerOz * ((S32Ounces)S32TallCup(1) + (S32Ounces)S32GrandeCup(3)).value()
+ && all_day.getMax(sCaffeineLevelStat) == sCaffeinePerOz * ((S32Ounces)S32TallCup(1) + (S32Ounces)S32GrandeCup(3) + (S32Ounces)S32VentiCup(1)).value()
+ && after_3pm.getMax(sCaffeineLevelStat) == sCaffeinePerOz * ((S32Ounces)S32TallCup(1) + (S32Ounces)S32GrandeCup(3) + (S32Ounces)S32VentiCup(1)).value());
+ }
+
+}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f506765da3..0f155b8ad7 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1463,7 +1463,7 @@ bool LLAppViewer::mainLoop()
ms_sleep(500);
}
- const F64 max_idle_time = llmin(.005f*10.f*(F32MillisecondsImplicit)gFrameTimeSeconds, F32MillisecondsImplicit(5)); // 5 ms a second
+ const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second
idleTimer.reset();
S32 total_work_pending = 0;
S32 total_io_pending = 0;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index ad3df55ef1..a480eed2e7 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1058,12 +1058,8 @@ bool LLDrawable::isRecentlyVisible() const
if(!vis)
{
- LLviewerOctreeGroup* group = getGroup();
- if (group && group->isRecentlyVisible())
- {
- LLViewerOctreeEntryData::setVisible();
- vis = TRUE ;
- }
+ const U32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
+ vis = (sCurVisible - getVisible() < MIN_VIS_FRAME_RANGE);
}
return vis ;
@@ -1140,14 +1136,6 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
return retval;
}
-//virtual
-U32 LLDrawable::getMinFrameRange() const
-{
- const U32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
-
- return MIN_VIS_FRAME_RANGE ;
-}
-
//=======================================
// Spatial Partition Bridging Drawable
//=======================================
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index efb3e1d89d..b94f663f21 100755
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -194,7 +194,6 @@ public:
LLSpatialPartition* getSpatialPartition();
- virtual U32 getMinFrameRange()const;
void removeFromOctree();
void setSpatialBridge(LLSpatialBridge* bridge) { mSpatialBridge = (LLDrawable*) bridge; }
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 637505a826..481befdb44 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -409,7 +409,7 @@ bool LLViewerOctreeEntryData::isRecentlyVisible() const
return true;
}
- return (sCurVisible - mEntry->mVisible < getMinFrameRange());
+ return false;
}
void LLViewerOctreeEntryData::setVisible() const
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 7fdb5661d8..e610db96eb 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -149,8 +149,6 @@ public:
virtual void setOctreeEntry(LLViewerOctreeEntry* entry);
- virtual U32 getMinFrameRange()const = 0;
-
F32 getBinRadius() const {return mEntry->getBinRadius();}
const LLVector4a* getSpatialExtents() const;
LLviewerOctreeGroup* getGroup()const;
@@ -327,6 +325,7 @@ public:
//virtual
BOOL isRecentlyVisible() const;
+ LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;}
static U32 getNewOcclusionQueryObjectName();
static void releaseOcclusionQueryObjectName(U32 name);
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 838ac353d1..dc7b907a35 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -238,12 +238,6 @@ void LLVOCacheEntry::setState(U32 state)
}
}
-//virtual
-U32 LLVOCacheEntry::getMinFrameRange()const
-{
- return mMinFrameRange;
-}
-
void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
{
llassert(entry != NULL);
@@ -261,6 +255,12 @@ void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
if(getEntry() != NULL && isState(INACTIVE))
{
updateParentBoundingInfo(entry);
+ if(getGroup())
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();
+ group->unbound();
+ ((LLVOCachePartition*)group->getSpatialPartition())->setDirty();
+ }
}
}
@@ -365,6 +365,27 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const
return success ;
}
+bool LLVOCacheEntry::isRecentlyVisible() const
+{
+ bool vis = LLViewerOctreeEntryData::isRecentlyVisible();
+
+ if(!vis)
+ {
+ vis = (sCurVisible - getVisible() < mMinFrameRange);
+ }
+
+ //combination of projected area and squared distance
+ if(!vis && !mParentID && mSceneContrib > 0.0311f) //projection angle > 10 (degree)
+ {
+ //squared distance
+ const F32 SQUARED_CUT_OFF_DIST = 256.0; //16m
+ F32 rad = getBinRadius();
+ vis = (rad * rad / mSceneContrib < SQUARED_CUT_OFF_DIST);
+ }
+
+ return vis;
+}
+
void LLVOCacheEntry::calcSceneContribution(const LLVector3& camera_origin, bool needs_update, U32 last_update)
{
if(!needs_update && getVisible() >= last_update)
@@ -381,8 +402,11 @@ void LLVOCacheEntry::calcSceneContribution(const LLVector3& camera_origin, bool
lookAt.setSub(center, origin);
F32 squared_dist = lookAt.dot3(lookAt).getF32();
- F32 rad = getBinRadius();
- mSceneContrib = rad * rad / squared_dist;
+ if(squared_dist > 0.f)
+ {
+ F32 rad = getBinRadius();
+ mSceneContrib = rad * rad / squared_dist;
+ }
setVisible();
}
@@ -479,12 +503,17 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
new LLOcclusionCullingGroup(mOctree, this);
}
+void LLVOCachePartition::setDirty()
+{
+ mDirty = TRUE;
+}
+
void LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
{
llassert(entry->hasVOCacheEntry());
mOctree->insert(entry);
- mDirty = TRUE;
+ setDirty();
}
void LLVOCachePartition::removeEntry(LLViewerOctreeEntry* entry)
@@ -609,13 +638,13 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
}
mCulledTime[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
- if(!mDirty && !mCullHistory[LLViewerCamera::sCurCameraID] && LLViewerRegion::isViewerCameraStatic())
- {
- return 0; //nothing changed, skip culling
- }
+ //if(!mDirty && !mCullHistory[LLViewerCamera::sCurCameraID] && LLViewerRegion::isViewerCameraStatic())
+ //{
+ // return 0; //nothing changed, skip culling
+ //}
((LLviewerOctreeGroup*)mOctree->getListener(0))->rebound();
- mCullHistory[LLViewerCamera::sCurCameraID] <<= 2;
+ mCullHistory[LLViewerCamera::sCurCameraID] <<= 1;
//localize the camera
LLVector3 region_agent = mRegionp->getOriginAgent();
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index c448b97b80..4eca083445 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -83,12 +83,14 @@ public:
bool hasState(U32 state) {return mState & state;}
U32 getState() const {return mState;}
+ //virtual
+ bool isRecentlyVisible() const;
+
U32 getLocalID() const { return mLocalID; }
U32 getCRC() const { return mCRC; }
S32 getHitCount() const { return mHitCount; }
S32 getCRCChangeCount() const { return mCRCChangeCount; }
- U32 getMinFrameRange()const;
-
+
void calcSceneContribution(const LLVector3& camera_origin, bool needs_update, U32 last_update);
void setSceneContribution(F32 scene_contrib) {mSceneContrib = scene_contrib;}
F32 getSceneContribution() const { return mSceneContrib;}
@@ -162,14 +164,13 @@ public:
/*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion);
void addOccluders(LLviewerOctreeGroup* gp);
void resetOccluders();
-
- static LLTrace::MemStatHandle sMemStat;
-
-public:
void processOccluders(LLCamera* camera);
+
+ void setDirty();
public:
static BOOL sNeedsOcclusionCheck;
+ static LLTrace::MemStatHandle sMemStat;
private:
BOOL mDirty;
diff --git a/indra/test/manageapr.h b/indra/test/manageapr.h
deleted file mode 100755
index 2452fb6ae4..0000000000
--- a/indra/test/manageapr.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file manageapr.h
- * @author Nat Goodspeed
- * @date 2012-01-13
- * @brief ManageAPR class for simple test programs
- *
- * $LicenseInfo:firstyear=2012&license=viewerlgpl$
- * Copyright (c) 2012, Linden Research, Inc.
- * $/LicenseInfo$
- */
-
-#if ! defined(LL_MANAGEAPR_H)
-#define LL_MANAGEAPR_H
-
-#include "llapr.h"
-#include <boost/noncopyable.hpp>
-
-/**
- * Declare a static instance of this class for dead-simple ll_init_apr() at
- * program startup, ll_cleanup_apr() at termination. This is recommended for
- * use only with simple test programs. Once you start introducing static
- * instances of other classes that depend on APR already being initialized,
- * the indeterminate static-constructor-order problem rears its ugly head.
- */
-class ManageAPR: public boost::noncopyable
-{
-public:
- ManageAPR()
- {
- ll_init_apr();
- }
-
- ~ManageAPR()
- {
- ll_cleanup_apr();
- }
-
- static std::string strerror(apr_status_t rv)
- {
- char errbuf[256];
- apr_strerror(rv, errbuf, sizeof(errbuf));
- return errbuf;
- }
-};
-
-#endif /* ! defined(LL_MANAGEAPR_H) */