diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawable.h | 44 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerassetstats.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvieweroctree.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llvowlsky.cpp | 2 |
9 files changed, 39 insertions, 37 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 9521287a45..161f550bb6 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -60,7 +60,9 @@ const U32 SILHOUETTE_HIGHLIGHT = 0; // All data for new renderer goes into this class. LL_ALIGN_PREFIX(16) -class LLDrawable : public LLViewerOctreeEntryData, public LLTrace::MemTrackable<LLDrawable> +class LLDrawable +: public LLViewerOctreeEntryData, + public LLTrace::MemTrackable<LLDrawable> { public: LLDrawable(const LLDrawable& rhs) : LLViewerOctreeEntryData(rhs) @@ -76,16 +78,6 @@ public: static void initClass(); - void* operator new(size_t size) - { - return ll_aligned_malloc_16(size); - } - - void operator delete(void* ptr) - { - ll_aligned_free_16(ptr); - } - LLDrawable(LLViewerObject *vobj, bool new_entry = false); void markDead(); // Mark this drawable as dead @@ -93,7 +85,7 @@ public: BOOL isNew() const { return !isState(BUILT); } BOOL isLight() const; - + virtual void setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results = NULL, BOOL for_select = FALSE); LLSpatialGroup* getSpatialGroup()const {return (LLSpatialGroup*)getGroup();} @@ -115,7 +107,7 @@ public: const LLQuaternion& getRotation() const { return mXform.getRotation(); } F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); } S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; } - + void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); } LLXformMatrix* getXform() { return &mXform; } @@ -290,33 +282,33 @@ public: ANIMATED_CHILD = 0x20000000, ACTIVE_CHILD = 0x40000000, } EDrawableFlags; - + public: LLXformMatrix mXform; // vis data LLPointer<LLDrawable> mParent; - F32 mDistanceWRTCamera; - + F32 mDistanceWRTCamera; + static F32 sCurPixelAngle; //current pixels per radian static LLTrace::MemStat sMemStat; private: typedef std::vector<LLFace*> face_list_t; - U32 mState; - S32 mRenderType; - LLPointer<LLViewerObject> mVObjp; - face_list_t mFaces; - LLPointer<LLDrawable> mSpatialBridge; - - F32 mRadius; - S32 mGeneration; + U32 mState; + S32 mRenderType; + LLPointer<LLViewerObject> mVObjp; + face_list_t mFaces; + LLPointer<LLDrawable> mSpatialBridge; - LLVector3 mCurrentScale; + F32 mRadius; + S32 mGeneration; - static U32 sNumZombieDrawables; + LLVector3 mCurrentScale; + + static U32 sNumZombieDrawables; static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList; } LL_ALIGN_POSTFIX(16); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 7a960f7baa..bafd245aa0 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -358,7 +358,7 @@ void LLSceneMonitor::calcDiffAggregate() glBeginQueryARB(GL_SAMPLES_PASSED_ARB, mQueryObject); } - gl_draw_scaled_target(0, 0, mDiff->getWidth() * mDiffPixelRatio, mDiff->getHeight() * mDiffPixelRatio, mDiff); + gl_draw_scaled_target(0, 0, S32(mDiff->getWidth() * mDiffPixelRatio), S32(mDiff->getHeight() * mDiffPixelRatio), mDiff); if(mHasNewDiff) { @@ -440,8 +440,8 @@ void LLSceneMonitorView::draw() } F32 ratio = LLSceneMonitor::getInstance()->getDiffPixelRatio(); - S32 height = target->getHeight() * ratio; - S32 width = target->getWidth() * ratio; + S32 height = (S32)(target->getHeight() * ratio); + S32 width = (S32)(target->getWidth() * ratio); //S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.5f); //S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.5f); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 01f9151ab4..fba636e8ef 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3746,11 +3746,12 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher) main_stats.getStats(stats, true); //LLSD merged_llsd = main_stats.asLLSD(); + bool initial_report = !reporting_started; stats.session_id = mSessionID; stats.agent_id = mAgentID; stats.message = "ViewerAssetMetrics"; stats.sequence = static_cast<bool>(report_sequence); - stats.initial = static_cast<bool>(!reporting_started); + stats.initial = initial_report; stats.break_ = static_cast<bool>(LLTextureFetch::svMetricsDataBreak); LLSD sd; diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index b4da9521f4..890394dd22 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -297,7 +297,7 @@ LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src) it->second.makeUnique(); } - LLStopWatchControlsMixin<LLViewerAssetStats>::initTo(src.getPlayState()); + LLStopWatchControlsMixin<LLViewerAssetStats>::setPlayState(src.getPlayState()); } void LLViewerAssetStats::handleStart() diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index 5bcaeb85da..a35c551949 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -324,4 +324,4 @@ protected: S32 mRes; }; -#endif
\ No newline at end of file +#endif diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f44c8ffe46..45d43bdf74 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1001,7 +1001,10 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time) { if(vo_entry->getState() >= LLVOCacheEntry::WAITING) { - iter = mImpl->mVisibleEntries.erase(iter); + LLVOCacheEntry::vocache_entry_set_t::iterator next_iter = iter; + ++next_iter; + mImpl->mVisibleEntries.erase(iter); + iter = next_iter; } else { diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 077c9f43a4..136a4d0a9e 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -394,7 +394,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); + gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)); texture_stats_timer.reset(); } } diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 2d5292b5f3..482f6a77a3 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -216,7 +216,10 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Texture Fetch bps\t" << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + if (fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ) != data_msg.str().size()) + { + llwarns << "Failed to write log file." << llendl; + } } else { @@ -249,7 +252,10 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "\t" << (mTextureFetchSize * 8 / delta_time) << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + if (fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ) != data_msg.str().size()) + { + llwarns << "Failed to write log file." << llendl; + } clearStats(); } diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 7f17fd3e56..717f215d3d 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -394,7 +394,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) segment->flush(); } - llinfos << "completed in " << llformat("%.2f", timer.getElapsedTimeF32()) << "seconds" << llendl; + llinfos << "completed in " << llformat("%.2f", timer.getElapsedTimeF32().value()) << "seconds" << llendl; } #else mStripsVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); |