Commit Graph

275 Commits (5dcd81c15507ad8f487e5727bc7a94de82f6fb45)

Author SHA1 Message Date
Nat Goodspeed 464a0df4c1 DRTVWR-418: Unify control flow through LLAppViewer across platforms.
The LLApp API used to consist of init(), mainLoop(), cleanup() methods. This
makes sense -- but on Mac that structure was being subverted. The method
called mainLoop() was in fact being called once per frame. There was
initialization code in the method, which (on Mac) needed to be skipped with an
already-initialized bool. There was a 'while' loop which (on Mac) needed to be
turned into an 'if' instead so the method would return after every frame.

Rename LLApp::mainLoop() to frame(). Propagate through subclasses LLAppViewer
and LLCrashLogger. Document the fact that frame() returns true to mean "done."
(This was always the case, but had to be inferred from the code.)

Rename the Mac Objective-C function mainLoop to oneFrame. Rename the C++ free
function it calls from runMainLoop() to pumpMainLoop(). Add comments to
llappdelegate-objc.mm explaining (inferred) control flow.

Change the Linux viewer main() and the Windows viewer WINMAIN() from a single
LLAppViewer::mainLoop() call to repeatedly call frame() until it returns true.

Move initialization code from the top of LLAppViewer::frame() to the init()
method, where it more properly belongs. Remove corresponding
mMainLoopInitialized flag (and all references) from LLAppViewer.

Remove 'while (! LLApp::isExiting())' (or on Mac, 'if (! LLApp::isExiting())')
from LLAppViewer::frame() -- thus unindenting the whole body of the 'while'
and causing many lines of apparent change. (Apologies to reviewers.)

There are four LLApp states: APP_STATUS_RUNNING, APP_STATUS_QUITTING,
APP_STATUS_STOPPED and APP_STATUS_ERROR. Change LLAppViewer::frame() return
value from (isExiting()) (QUITTING or ERROR) to (! isRunning()). I do not know
under what circumstances the state might transition to STOPPED during a
frame() call, but I'm quite sure that if it does, we don't want to call
frame() again. We only want a subsequent call if the state is RUNNING.

Also rename mainLoop() method in LLCrashLogger subclasses
LLCrashLoggerWindows, LLCrashLoggerMac, LLCrashLoggerLinux. Of course it's
completely up to the frame() method whether to yield control; none of those in
fact do. Honor protocol by returning true (frame() is done), even though each
one's main() caller ignores the return value.

In fact LLCrashLoggerWindows::mainLoop() wasn't using the return protocol
correctly anyway, returning wParam or 0 or 1 -- possibly because the return
protocol was never explicitly documented. It should always return true: "I'm
done, don't call me again."
2016-06-30 16:51:50 -04:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden 867ef882fd merge changes for OPEN-292 2016-02-07 13:41:41 -08:00
Cinder Biscuits cc235cdcc4 Merged lindenlab/viewer-tools-update into default 2015-11-29 20:14:22 -07:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 907efc9cc9 MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp lib 2015-09-15 17:01:26 -07:00
Rider Linden 196caf21a8 MAINT-5507: Removal of sdrpc client/server
MAINT-5507: removal of LLCurl::Easy, LLCurl::Multi LLCurl::Responder
2015-09-14 16:10:20 -07:00
Rider Linden 32912a3958 MAINT-5507: Test checkin with RPC code and URL request disabled. Make sure it does not break non windows builds. 2015-09-14 13:33:50 -07:00
Rider Linden 5753c274ba Adding boost libs to lltest 2015-08-17 11:37:47 -07:00
Rider Linden efbbbca9b0 Get unit tests (Integration and project) compiling and linking again. 2015-08-17 10:25:11 -07:00
Oz Linden 5c6cf3e7fb restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes 2015-04-10 11:02:37 -04:00
Oz Linden 8b42c7898e replace llifstream and llofstream with std::ifstream and std::ofstream respectively 2015-04-07 17:59:28 -04:00
Oz Linden 3a57b18896 convert llifstream and llofstream to std::ifstream and std::ofstream respectively 2015-04-07 17:28:05 -04:00
Cinder ca08bd5aba OPEN-292 - Remove lscript from project,
Remove legacy udp script upload methods,
Refactor script runtime perms from three arrays to one struct array so we don't have to juggle array order anymore.
2015-02-08 12:53:39 -07:00
Nat Goodspeed 834a1f6afe Re-enable skipped test: evidently Windows APR libs CAN transcode.
I don't know at what point the skip() was introduced, but that test now passes
even on Windows.
2015-01-23 11:51:01 -05:00
Nat Goodspeed 210c95b283 Remove Visual Studio workaround for lack of std::fpclassify().
Visual Studio 2013 evidently does provide std::fpclassify(), so we no longer
need the funky local alias.
2014-12-16 14:03:57 -05:00
Nat Goodspeed d74d8ff7c5 Replace boost::lambda::_1 with boost::phoenix::placeholders::arg1.
Apparently in Boost 1.57 with Xcode 6, the combination of Boost.Lambda and
Boost.Function is broken -- Trac ticket 10864:
https://svn.boost.org/trac/boost/ticket/10864
However, Boost.Phoenix provides an acceptable replacement.
2014-12-10 11:15:56 -08:00
Nat Goodspeed c54d102c8f Wrap #pragma clang in #if __clang__, else VS produces fatal warnings. 2014-12-05 08:48:10 -05:00
Nat Goodspeed 80fdd85a0c Suppress non-useful NaN test in llsd_new_tut.cpp 2014-10-24 11:55:37 -07:00
Nat Goodspeed 918e2b629b Bring in new TUT library build. Clean up ensure_equals() overloads.
The new TUT library build eliminates the ambiguity about ensure_equals(const
char*, ...) versus ensure_equals(const std::string&, ...). Now it's all based
on const std::string&. Remove pointless const char* overloads and ambiguous
forwarding templates.
With clang in Xcode 6, any new datatypes we intend to use with ensure_equals()
must have operator<<(std::ostream&, datatype) declared BEFORE lltut.h
#includes tut.hpp. Reorder code in certain test source files to guarantee that
visibility.
2014-10-23 20:23:08 -07:00
Nat Goodspeed 642c334efa Fix Xcode 6 compile errors relating to tut::ensure_equals() overloads.
lltut.h declares a number of ensure_equals() overloads for various data types,
notably the types supported by LLSD. We expect these to be called by tut code.
But the tut code in question is in a template in tut.hpp -- which was
#included BEFORE the overloads were declared. Previous C++ compilers have
evidently made multiple passes, collecting the relevant overloads before
attempting to compile the template bodies. clang does not, complaining that
the overloads must be declared before the tut.hpp template code that
references them. Reordering parts of lltut.h seems to address that problem.
For similar reasons, test programs that use StringVec.h and its operator<<()
must #include StringVec.h before lltut.h.
Add ensure_equals(const std::string&, const LLSD::Binary&, const LLSD::Binary&)
overload. The sloppy mix of (const char*, ...) and (const std::string&, ...)
overloads bothers me, since for many of those ... types we seem to have to
duplicate them.
2014-10-23 08:44:42 -07:00
callum_linden 2b8673d15a Update to build on Xcode 6.0 (fix unit tests): comment out failing unit test in llsd_new_tut.cpp to let the build proceed - will fix later 2014-10-22 18:06:21 -07:00
Oz Linden 7b6554db3d added quoting to clarify failure messages 2014-10-22 11:59:20 -04:00
callum_linden f3baf8dc4e Update to build on Xcode 6.0: remove #pragmas from code to deal with tut warnigs/errors (moved to package) AND bracket clang #pragmas in #if LL_DARWIN 2014-10-20 16:02:03 -07:00
callum_linden 86f49bec1b Update to build on Xcode 6.0: turn off warnings about unused functions from clang for tut package 2014-10-17 20:25:31 -07:00
callum_linden 618bb404fc Update to build on Xcode 6.0: turn off warnings about unused functions from clang for tut package 2014-10-17 16:53:40 -07:00
callum_linden d20c719f03 Update to build on Xcode 6.0: turn off warnings about unused functions from clang for tut package 2014-10-17 16:20:36 -07:00
JJ Linden 5cb5c267ca fixes for cmake warnings about policy changes. could not fully test these changes 2014-10-13 12:46:55 -07:00
Oz Linden e15002a11c merge changes for 3.7.9-release 2014-06-16 11:42:37 -04:00
Stinson Linden 8392fde6f6 Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-drtvwr-365. 2014-06-02 22:32:16 +01:00
Stinson Linden 08e83a341e MAINT-4009: Final pass refactoring to eliminate memory allocation related to error reporting that is not properly cleaned up. 2014-05-17 00:41:36 +01:00
Stinson Linden 34b2f2d1f8 MAINT-4009: First pass refactoring to eliminate memory related to error reporting that is not properly cleaned up. 2014-05-16 22:44:25 +01:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Oz Linden a98b4b6bee merge changes for 3.7.7-release 2014-05-07 11:09:04 -04:00
Oz Linden a373a7442c merge changes for 3.7.2-release 2014-03-04 13:15:43 -05:00
Oz Linden b0c255f4e6 merge up to 3.7.0-release and get unit test fixes 2014-02-11 09:20:58 -05:00
Jonathan Yap b30bfd3753 STORM-1915 Fix unit tests 2014-02-10 20:06:05 -05:00
Brad Payne (Vir Linden) 1f8b37e9ad merge 2013-10-16 11:52:43 -04:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Graham Linden 2a03e8f9fb MAINT-3172 fix rendering regressions from release mergedown 2013-09-20 16:44:39 -07:00
Richard Linden a77f424945 BUILDFIX: fix for crashes in unit tests on mac and linux 2013-08-23 13:41:51 -07:00
Nyx Linden 5ae117aff6 merge with viewer-release 2013-08-16 19:31:16 -04:00
Richard Linden d83c51a4e1 BUILDFIX: converted platform-specific files over to new LL_INFOS, etc macros 2013-08-14 21:58:30 -07:00
Richard Linden cc31b4ae79 SH-4399 FIX: Interesting: Texture console MB Bound 0/384 and texture queue bounces once per second
SH-4346 FIX: Interesting: some integer Statistics are displayed as floating point after crossing region boundary
made llerrs/infos/etc properly variadic wrt tags
LL_INFOS("A", "B", "C") works, for example
fixed unit tests
remove llsimplestat
2013-08-12 20:05:16 -07:00
Richard Linden e740fcc959 BUILDFIX: removed usage of llversionserver.h 2013-07-31 10:23:18 -07:00
Richard Linden 04bdc8ba83 SH-4294 FIX Interesting: Statistics Texture cache hit rate is always 0%
also, removed LLTrace::init and cleanup
removed derived class implementation of memory stat for LLMemTrackable
is automatic now
2013-07-01 17:04:01 -07:00
Dave Parks 79029149a4 Automated merge with file:///F:%5Cviewer-bear 2013-06-21 12:51:29 -05:00
Richard Linden a2a6bf20d7 merge with release 2013-06-20 16:46:23 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Brad Payne (Vir Linden) a04a706c1b merge 2013-05-21 16:18:48 -04:00