summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llfontvertexbuffer.cpp9
-rw-r--r--indra/llrender/llfontvertexbuffer.h7
-rw-r--r--indra/llrender/llrender.cpp114
-rw-r--r--indra/llrender/llrender.h4
-rw-r--r--indra/llui/llbadge.cpp1
-rw-r--r--indra/llui/llbutton.cpp1
-rw-r--r--indra/llui/llbutton.h6
-rw-r--r--indra/llui/llscrolllistcell.cpp1
-rw-r--r--indra/newview/llhudnametag.h4
9 files changed, 7 insertions, 140 deletions
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 417bacd69d..96ec94fe0f 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -31,8 +31,7 @@
#include "llvertexbuffer.h"
-LLFontVertexBuffer::LLFontVertexBuffer(bool track_changes)
-: mTrackStringChanges(track_changes)
+LLFontVertexBuffer::LLFontVertexBuffer()
{
}
@@ -141,11 +140,6 @@ S32 LLFontVertexBuffer::render(
genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
}
- else if (mTrackStringChanges && mLastStringHash != sStringHasher._Do_hash(text))
- {
- genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
- style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
- }
else
{
renderBuffers();
@@ -183,7 +177,6 @@ void LLFontVertexBuffer::genBuffers(
mLastOffset = begin_offset;
mLastMaxChars = max_chars;
mLastMaxPixels = max_pixels;
- mLastStringHash = sStringHasher._Do_hash(text);
mLastX = x;
mLastY = y;
mLastColor = color;
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index d41c6205ac..67cf2ca13c 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -35,7 +35,7 @@ class LLVertexBufferData;
class LLFontVertexBuffer
{
public:
- LLFontVertexBuffer(bool track_changes = true);
+ LLFontVertexBuffer();
~LLFontVertexBuffer();
void reset();
@@ -101,7 +101,6 @@ private:
S32 mLastOffset = 0;
S32 mLastMaxChars = 0;
S32 mLastMaxPixels = 0;
- size_t mLastStringHash = 0;
F32 mLastX = 0.f;
F32 mLastY = 0.f;
LLColor4 mLastColor;
@@ -115,10 +114,6 @@ private:
F32 mLastScaleX = 1.f;
F32 mLastScaleY = 1.f;
LLCoordGL mLastOrigin;
-
- bool mTrackStringChanges = true;
-
- static std::hash<LLWString> sStringHasher;
};
#endif
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index b906563b08..a40a668a70 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1592,50 +1592,6 @@ void LLRender::end()
}
}
-LLVertexBuffer* LLRender::beginNoCache(const GLuint& mode, S32& count)
-{
- if (mode != mMode)
- {
- if (mode == LLRender::QUADS)
- {
- mQuadCycle = 1;
- }
-
- if (mMode == LLRender::QUADS ||
- mMode == LLRender::LINES ||
- mMode == LLRender::TRIANGLES ||
- mMode == LLRender::POINTS)
- {
- return getBuffer(count);
- }
- else if (mCount != 0)
- {
- LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL;
- }
- mMode = mode;
- }
- return nullptr;
-}
-
-LLVertexBuffer* LLRender::endNoCache(S32& count)
-{
- if (mCount == 0)
- {
- return nullptr;
- //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
- }
-
- if ((mMode != LLRender::QUADS &&
- mMode != LLRender::LINES &&
- mMode != LLRender::TRIANGLES &&
- mMode != LLRender::POINTS) ||
- mCount > 2048)
- {
- return getBuffer(count);
- }
- return nullptr;
-}
-
void LLRender::flush()
{
STOP_GLERROR;
@@ -1844,76 +1800,6 @@ void LLRender::resetStriders(S32 count)
mCount = 0;
}
-LLVertexBuffer* LLRender::getBuffer(S32 & count)
-{
- STOP_GLERROR;
- LLVertexBuffer *vb;
- if (mCount > 0)
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
- llassert(LLGLSLShader::sCurBoundShaderPtr != nullptr);
- if (!mUIOffset.empty())
- {
- sUICalls++;
- sUIVerts += mCount;
- }
-
- //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
- count = mCount;
-
- if (mMode == LLRender::QUADS && !sGLCoreProfile)
- {
- if (mCount % 4 != 0)
- {
- count -= (mCount % 4);
- LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
- }
- }
-
- if (mMode == LLRender::TRIANGLES)
- {
- if (mCount % 3 != 0)
- {
- count -= (mCount % 3);
- LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
- }
- }
-
- if (mMode == LLRender::LINES)
- {
- if (mCount % 2 != 0)
- {
- count -= (mCount % 2);
- LL_WARNS() << "Incomplete line requested." << LL_ENDL;
- }
- }
-
- mCount = 0;
-
- if (mBuffer)
- {
- LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
-
- U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
- vb = genBuffer(attribute_mask, count);
- drawBuffer(vb, mMode, count);
- }
- else
- {
- // mBuffer is present in main thread and not present in an image thread
- LL_ERRS() << "A flush call from outside main rendering thread" << LL_ENDL;
- }
-
- resetStriders(count);
- }
- else
- {
- count = 0;
- }
-
- return vb;
-}
-
void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
//the range of mVerticesp, mColorsp and mTexcoordsp is [0, 4095]
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index aeee8685ab..39c13e328a 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -45,6 +45,7 @@
#include "glh/glh_linear.h"
#include <array>
+#include <list>
class LLVertexBuffer;
class LLCubeMap;
@@ -423,9 +424,6 @@ public:
void begin(const GLuint& mode);
void end();
- LLVertexBuffer* beginNoCache(const GLuint& mode, S32& count);
- LLVertexBuffer* endNoCache(S32& count);
- LLVertexBuffer* getBuffer(S32& count);
U8 getMode() const { return mMode; }
void vertex2i(const GLint& x, const GLint& y);
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 48489db615..c6654ee0aa 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -105,7 +105,6 @@ LLBadge::LLBadge(const LLBadge::Params& p)
, mPaddingVert(p.padding_vert)
, mParentScroller(NULL)
, mDrawAtParentTop(false)
- , mFontBuffer(false)
{
if (mImage.isNull())
{
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index d4e5d501db..387d2c0d07 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -124,7 +124,6 @@ LLButton::Params::Params()
LLButton::LLButton(const LLButton::Params& p)
: LLUICtrl(p),
LLBadgeOwner(getHandle()),
- mFontBuffer(false),
mMouseDownFrame(0),
mMouseHeldDownCount(0),
mFlashing( false ),
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 23a3a05e65..6a389f0554 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -253,8 +253,8 @@ public:
void setDisabledLabelColor(const LLUIColor& c);
void setFont(const LLFontGL* font);
- const LLFontGL* getFont() const { return mGLFont; }
- const std::string& getText() const { return getCurrentLabel().getString(); }
+ const LLFontGL* getFont() const override { return mGLFont; }
+ const std::string& getText() const override { return getCurrentLabel().getString(); }
S32 getLastDrawCharsCount() const { return mLastDrawCharsCount; }
bool labelIsTruncated() const;
@@ -392,7 +392,7 @@ private:
LLFontVertexBuffer mFontBuffer;
protected:
- virtual std::string _getSearchText() const
+ virtual std::string _getSearchText() const override
{
return getLabelUnselected() + getToolTip();
}
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 8b998971b6..a3108d77e8 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -256,7 +256,6 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
mText(p.label.isProvided() ? p.label() : p.value().asString()),
mAltText(p.alt_value().asString()),
mFont(p.font),
- mFontBuffer(false),
mColor(p.color),
mUseColor(p.color.isProvided()),
mFontAlignment(p.font_halign),
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 0a882ac273..b48a606982 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -59,9 +59,7 @@ protected:
: mColor(color),
mStyle(style),
mText(text),
- mFont(font),
- mFontBufferLabel(false),
- mFontBufferText(false)
+ mFont(font)
{}
F32 getWidth(const LLFontGL* font);
const LLWString& getText() const { return mText; }