From b3b30285126289f54b57bd42569bb0721e40e088 Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Sun, 10 Oct 2010 22:10:33 +0100 Subject: Revert "port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system" This reverts commit 087e15e89930d51c3964329befb273ae3b2d330d. Conflicts: linden/indra/newview/llsurface.cpp linden/indra/newview/llviewerwindow.cpp linden/indra/newview/llvoavatar.cpp linden/indra/newview/pipeline.cpp linden/indra/newview/pipeline.h --- linden/indra/newview/llconsole.h | 47 ++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'linden/indra/newview/llconsole.h') diff --git a/linden/indra/newview/llconsole.h b/linden/indra/newview/llconsole.h index 578670e..2915c48 100644 --- a/linden/indra/newview/llconsole.h +++ b/linden/indra/newview/llconsole.h @@ -33,8 +33,7 @@ #ifndef LL_LLCONSOLE_H #define LL_LLCONSOLE_H -#include "llerrorcontrol.h" // For LLLineBuffer -#include "llthread.h" +#include "llfixedbuffer.h" #include "llview.h" #include "v4color.h" #include @@ -48,10 +47,10 @@ private: F32 mLinePersistTime; // Age at which to stop drawing. F32 mFadeTime; // Age at which to start fading LLFontGL* mFont; + S32 mLastBoxHeight; + S32 mLastBoxWidth; S32 mConsoleWidth; S32 mConsoleHeight; - LLMutex mQueueMutex; - LLTimer mTimer; public: //A paragraph color segment defines the color of text in a line @@ -81,7 +80,14 @@ public: typedef std::list line_color_segments_t; - typedef std::list lines_t; + //A line is composed of one or more color segments. + class Line + { + public: + line_color_segments_t mLineColorSegments; + }; + + typedef std::list lines_t; typedef std::list paragraph_color_segments_t; //A paragraph is a processed element containing the entire text of the @@ -92,7 +98,7 @@ public: class Paragraph { public: - Paragraph (LLWString str, const LLColor4 &color, F32 add_time); + Paragraph (LLWString str, const LLColor4 &color, F32 add_time, LLFontGL* font, F32 screen_width); void makeParagraphColorSegments ( const LLColor4 &color); void updateLines ( F32 screen_width, LLFontGL* font, bool force_resize=false ); public: @@ -105,32 +111,35 @@ public: }; //The console contains a deque of paragraphs which represent the individual messages. - typedef std::deque paragraph_t; + typedef std::deque paragraph_t; paragraph_t mParagraphs; - paragraph_t mNewParagraphs; // Font size: // -1 = monospace, 0 means small, font size = 1 means big - LLConsole(const std::string& name, const LLRect &rect, - S32 font_size_index, F32 persist_time ); - ~LLConsole(); + LLConsole(const std::string& name, const U32 max_lines, const LLRect &rect, + S32 font_size_index, F32 persist_time ); + ~LLConsole(){}; // each line lasts this long after being added - void setLinePersistTime(F32 seconds); + void setLinePersistTime(F32 seconds); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); // -1 = monospace, 0 means small, font size = 1 means big - void setFontSize(S32 size_index); + void setFontSize(S32 size_index); - // From LLLineBuffer - /*virtual*/ void clear(); - /*virtual*/ void addLine(const std::string& utf8line); - void addConsoleLine(const std::string& utf8line, const LLColor4 &color); - void addConsoleLine(const LLWString& wline, const LLColor4 &color); + void addLine(const std::string& utf8line, F32 size, const LLColor4 &color); + void addLine(const LLWString& wline, F32 size, const LLColor4 &color); // Overrides /*virtual*/ void draw(); + + //do not make these two "virtual" + void addLine(const std::string& utf8line); + void addLine(const LLWString& line); + +private: + void updateBuffer() ; }; extern LLConsole* gConsole; -- cgit v1.1