Commit Graph

64 Commits (95e44923920fbd57eaeec50ae696aee80405b457)

Author SHA1 Message Date
Rye Mutt b5e306f7d8
Enable /permissive- on MSVC for better standards conformance (#2251)
* Enable /permissive- on MSVC for better C++ conformance and fix related errors

* Clean up left over warning suppressions from old library or msvc versions
2024-08-14 08:01:02 -07:00
Ansariel b42f9d836b Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings 2024-06-01 15:49:26 +02:00
Ansariel e2e37cced8 Fix line endlings 2024-05-22 22:40:26 +03:00
Ansariel 1b67dd855c Merge remote-tracking branch 'origin/main' into DRTVWR-600-maint-A
# Conflicts:
#	autobuild.xml
#	indra/cmake/CMakeLists.txt
#	indra/cmake/GoogleMock.cmake
#	indra/llaudio/llaudioengine_fmodstudio.cpp
#	indra/llaudio/llaudioengine_fmodstudio.h
#	indra/llaudio/lllistener_fmodstudio.cpp
#	indra/llaudio/lllistener_fmodstudio.h
#	indra/llaudio/llstreamingaudio_fmodstudio.cpp
#	indra/llaudio/llstreamingaudio_fmodstudio.h
#	indra/llcharacter/llmultigesture.cpp
#	indra/llcharacter/llmultigesture.h
#	indra/llimage/llimage.cpp
#	indra/llimage/llimagepng.cpp
#	indra/llimage/llimageworker.cpp
#	indra/llimage/tests/llimageworker_test.cpp
#	indra/llmessage/tests/llmockhttpclient.h
#	indra/llprimitive/llgltfmaterial.h
#	indra/llrender/llfontfreetype.cpp
#	indra/llui/llcombobox.cpp
#	indra/llui/llfolderview.cpp
#	indra/llui/llfolderviewmodel.h
#	indra/llui/lllineeditor.cpp
#	indra/llui/lllineeditor.h
#	indra/llui/lltextbase.cpp
#	indra/llui/lltextbase.h
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltextvalidate.cpp
#	indra/llui/lltextvalidate.h
#	indra/llui/lluictrl.h
#	indra/llui/llview.cpp
#	indra/llwindow/llwindowmacosx.cpp
#	indra/newview/app_settings/settings.xml
#	indra/newview/llappearancemgr.cpp
#	indra/newview/llappearancemgr.h
#	indra/newview/llavatarpropertiesprocessor.cpp
#	indra/newview/llavatarpropertiesprocessor.h
#	indra/newview/llbreadcrumbview.cpp
#	indra/newview/llbreadcrumbview.h
#	indra/newview/llbreastmotion.cpp
#	indra/newview/llbreastmotion.h
#	indra/newview/llconversationmodel.h
#	indra/newview/lldensityctrl.cpp
#	indra/newview/lldensityctrl.h
#	indra/newview/llface.inl
#	indra/newview/llfloatereditsky.cpp
#	indra/newview/llfloatereditwater.cpp
#	indra/newview/llfloateremojipicker.h
#	indra/newview/llfloaterimsessiontab.cpp
#	indra/newview/llfloaterprofiletexture.cpp
#	indra/newview/llfloaterprofiletexture.h
#	indra/newview/llgesturemgr.cpp
#	indra/newview/llgesturemgr.h
#	indra/newview/llimpanel.cpp
#	indra/newview/llimpanel.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryclipboard.cpp
#	indra/newview/llinventoryclipboard.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventoryfunctions.h
#	indra/newview/llinventorygallery.cpp
#	indra/newview/lllistbrowser.cpp
#	indra/newview/lllistbrowser.h
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpreviewgesture.cpp
#	indra/newview/llsavedsettingsglue.cpp
#	indra/newview/llsavedsettingsglue.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llurllineeditorctrl.cpp
#	indra/newview/llvectorperfoptions.cpp
#	indra/newview/llvectorperfoptions.h
#	indra/newview/llviewerparceloverlay.cpp
#	indra/newview/llviewertexlayer.cpp
#	indra/newview/llviewertexturelist.cpp
#	indra/newview/macmain.h
#	indra/test/test.cpp
2024-05-22 19:04:52 +02:00
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Ansariel 60d3dd98a4 Convert remaining BOOL to bool 2024-02-21 23:14:31 +02:00
Lars Næsbye Christensen 4419bb8709 more misc: BOOL (int) to real bool 2024-02-12 23:17:22 +02:00
Andrey Kleshchev 7649114588 Merge branch master (DRTVWR-571) into DRTVWR-559
# Conflicts:
#	indra/newview/llpanelface.cpp
#	indra/newview/llpanelface.h
2022-09-16 21:07:39 +03:00
Andrey Kleshchev d1265cda36 SL-17425 Crash when closing two dependent floaters
dependent_it in llfloater was not valid after dependent floater removed itself from the list
2022-05-20 01:35:40 +03:00
Dave Parks b6841d75c2 SL-17219 WIP - Texture pipeline overhaul 2022-04-15 19:02:07 -05:00
maxim_productengine 7a2e3dd1bc MAINT-8611 Prevent object media updates if media preference is disabled 2018-05-14 18:24:01 +03:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04: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 bbb9d4f21b MAINT-5732: Change to the way event polling handles error conditions and cancel calls.
Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr
Started minor refactor in the materials manager into coroutines (unfinished)
2015-10-14 17:46:24 -07:00
Rider Linden 907efc9cc9 MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp lib 2015-09-15 17:01:26 -07:00
Nat Goodspeed 80d17b2dd9 MAINT-4952: Use IntrusivePtr for BufferArray,HttpHeaders,HttpOptions.
Specifically, change the ptr_t typedefs for these LLCore classes to use
IntrusivePtr rather than directly using boost::intrusive_ptr. This allows us
to use a simple ptr_t(raw ptr) constructor rather than having to remember to
code ptr_t(raw ptr, false) everywhere. In fact, the latter form is now invalid:
remove the now-extraneous 'false' constructor parameters.
2015-06-29 17:19:51 -04:00
Rider Linden b0c64d5cbf Forgot a ';' 2015-04-29 09:30:37 -07:00
Rider Linden 56d6e32b45 Remove C++11 erase()
replace = NULL with .reset() on smart pointers.
2015-04-29 09:11:27 -07:00
Rider Linden 39d6252926 Convert some elements to STL 2015-04-28 16:50:42 -07:00
Rider Linden da32de179d Converting llmediaclient to new order.
Temp disable llmediaclient's unit tests for link issues.
2015-04-28 09:39:47 -07:00
callum_linden 6d9353de2a Update to build on Xcode 6.0: scoping fix for mediadata client 2014-10-19 17:23:57 -07:00
Brad Payne (Vir Linden) a04a706c1b merge 2013-05-21 16:18:48 -04:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Don Kjer beeefb4526 Renaming HTTP_HEADER_* into HTTP_IN_HEADER_* and HTTP_OUT_HEADER_* to make it more clear which header strings should be used for incoming vs outgoing situations.
Using constants for commonly used llhttpnode context strings.
2013-04-04 21:50:45 +00:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Don Kjer f945415210 Large changes to the LLCurl::Responder API, as well as pulling in some changes to common libraries from the server codebase:
* Additional error checking in http handlers.
* Uniform log spam for http errors.
* Switch to using constants for http heads and status codes.
* Fixed bugs in incorrectly checking if parsing LLSD xml resulted in an error.
* Reduced spam regarding LLSD parsing errors in the default completedRaw http handler.  It should not longer be necessary to short-circuit completedRaw to avoid spam.
* Ported over a few bug fixes from the server code.
* Switch mode http status codes to use S32 instead of U32.
* Ported LLSD::asStringRef from server code; avoids copying strings all over the place.
* Ported server change to LLSD::asBinary; this always returns a reference now instead of copying the entire binary blob.
* Ported server pretty notation format (and pretty binary format) to llsd serialization.

* The new LLCurl::Responder API no longer has two error handlers to choose from.  Overriding the following methods have been deprecated:
** error - use httpFailure
** errorWithContent - use httpFailure
** result - use httpSuccess
** completed - use httpCompleted
** completedHeader - no longer necessary; call getResponseHeaders() from a completion method to obtain these headers.

* In order to 'catch' a completed http request, override one of these methods:
** httpSuccess - Called for any 2xx status code.
** httpFailure - Called for any non-2xx status code.
** httpComplete - Called for all status codes.  Default implementation is to call either httpSuccess or httpFailure.
* It is recommended to keep these methods protected/private in order to avoid triggering of these methods without using a 'push' method (see below).

* Uniform error handling should followed whenever possible by calling a variant of this during httpFailure:
** llwarns << dumpResponse() << llendl;
* Be sure to include LOG_CLASS(your_class_name) in your class in order for the log entry to give more context.

* In order to 'push' a result into the responder, you should no longer call error, errorWithContent, result, or completed.
* Nor should you directly call httpSuccess/Failure/Completed (unless passing a message up to a parent class).
* Instead, you can set the internal content of a responder and trigger a corresponding method using the following methods:
** successResult - Sets results and calls httpSuccess
** failureResult - Sets results and calls httpFailure
** completedResult - Sets results and calls httpCompleted

* To obtain information about a the response from a reponder method, use the following getters:
** getStatus - HTTP status code
** getReason - Reason string
** getContent - Content (Parsed body LLSD)
** getResponseHeaders - Response Headers (LLSD map)
** getHTTPMethod - HTTP method of the request
** getURL - URL of the request

* It is still possible to override completeRaw if you want to manipulate data directly out of LLPumpIO.

* See indra/llmessage/llcurl.h for more information.
2013-03-13 06:26:25 +00:00
Don Kjer 54cdc322b8 Fixing issues with not detecting when LLSD XML parsing fails. Changing most http error handlers to understand LLSD error responses. Fleshing out most http error handler message spam. 2013-03-05 22:05:22 -08:00
Tofu Linden e416840f85 Backed out changeset c3d41f18ce2b
back-out the back-out for this branch.  yay.
2010-08-24 19:22:00 +01:00
Tofu Linden 98cc236503 Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
2010-08-24 18:44:39 +01:00
Tofu Linden 6ba23344c9 merge heads. whew. 2010-08-24 18:37:53 +01:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Monroe Linden bd708f82bd Patch on a fix for the llmediadataclient.cpp unit test.
My refactor of LLMediaDataClient caused a crash in the windows unit test.  Change set 92fd90bd795a fixed the crash, but broke the code in question.  This changeset should make the code behave correctly, while removing some premature optimization that I now think didn't properly in the first place.
2010-08-09 16:39:06 -07:00
Richard Linden 2f10bcf5f5 fix for unit test asserts 2010-08-03 12:13:50 -07:00
Richard Nelson 3c27e119b4 fixed windows build 2010-07-30 17:45:13 -07:00
Monroe Linden 94655359aa Yet more cleanup around llmediadataclient.
In LLVOVolume, added a count of LLMediaDataClientObjectImpl objects referencing each LLVOVolume object.  This allows LLVOVolume::markDead() to skip the relatively expensive calls to removeFromQueue() when the LLVOVolume is known to have no active references.

Refactored LLMediaDataClient and its two child classes so that only LLObjectMediaDataClient has the round-robin queue (LLObjectMediaNavigateClient doesn't need it), and cleaned up some of the virtual function hierarchy around queue processing.

In LLMediaDataClient, added tracking for requests that aren't currently in a queue (i.e. requests that are in flight or waiting for retries) so they can be found when their objects are marked dead.

LLMediaDataClient::Request now directly keeps track of the object ID and face associated with the request.

Removed the "markedSent" concept from requests.  Requests that have been sent are no longer kept in a queue.

The Retry timer now references the Request object instead of the Responder.

Replaced LLMediaDataClient::findOrRemove() with separate template functions for find and remove.
2010-07-29 15:50:20 -07:00
Monroe Linden 112abfe888 More cleanup around llmediadataclient.
LLMediaDataClient::Request no longer stores the LLSD payload -- it now uses the link to the LLVOVolume (which it was already keeping around) to generate the LLSD for the request at the time it's sent.

LLMediaDataClient::Request no longer stores a capability name.  Instead it uses the reference to its parent LLMediaDataClient subclass to refer to it as needed.

LLMediaDataClient::Request is now a base class, with subclasses for each specific request type -- GET, UPDATE, and NAVIGATE.

Responders are now created by a virtual method in the LLMediaDataClient::Request subclass instead of being created by the MDC.  This allows different request types to use different responder classes.

Fixed an issue with LLMediaDataClient::QueueTimer and LLMediaDataClient::RetryTimer that caused the unit test to fail (they now do all the work in their tick() functions instead of using the destructor).
2010-07-23 13:36:48 -07:00
Monroe Linden 51f310e4ae Miscellaneous cleanup in and around llmediadataclient.
Added tags to some media-related logging in LLVOVolume.

Made LLMediaDataClient::Responder do most of its work in tick() instead of its destructor.

Added a comment to llmediadataclient.cpp that explains the idea behind the two-queue system.

Made LLMediaDataClient::sortQueue() remove requests from the queue that hold references to dead items.  This should make teleporting away solve many of the pathological queueing cases.

Updated llmediadataclient test cases to reflect the change in behavior in sortQueue().

Removed some unnecessary const-ness in LLMediaDataClient::enqueue, which caused it to have to use const_cast.
2010-07-21 17:46:17 -07:00
Rick Pasetto fb862f1815 Slight hack: if pixel area is 1024, force recalculation of it
This is because I've observed that in heavy regions, media was
not getting loaded because the queue items were stuck with the
head item at interest = 1024.  This is the "default" value, which
means it probably wasn't calculated yet.  This forces the
calculation.

Also cleaned up some logging in mediadataclient
2009-12-18 11:05:44 -08:00
Rick Pasetto d0262fa7ce Dial down logging in mediadataclient 2009-12-16 15:41:08 -08:00
Rick Pasetto da3ca7c5b9 Allow selection of media faces even if there is no impl. We record
the target object and use that fact to raise its interest level.

This is mostly a pass-off for monroe to take and run with
2009-12-14 12:03:44 -08:00
Rick Pasetto bbfb25077b Fix linux build 2009-12-11 12:10:16 -08:00
Rick Pasetto 2d01d763d5 PARTIAL DEV-43869 - add "isInterestingEnough()" to the queue calculation
This change bumps the queue sizes way up, because we
think that the "isInterestingEnough()" call will prevent
loading more media data than we think is necessary.
Still need to implement it in LLVOVolume, though
2009-12-10 17:03:40 -08:00
Rick Pasetto 248427b8f9 PARTIAL DEV-43869: LLMediaDataClient now uses two queues
This is a fairly major change that addresses the issue of an object
with constantly-updating media.  Before, that object would be put
into our single queue and sorted to a particular spot, and since it
continuously updates, it would "always be there".  That means that
nothing "behind" it would ever get serviced.

This change introduces two queues for each MDC: one is the same
"sorted" queue as before, and the other is unsorted, and
"round-robins".  New objects go into the sorted queue, objects
whose media we already know about get put into the unsorted queue.
The two queues are interleaved when serviced (one then the other is
serviced -- if one is empty we try the other -- until they are both
drained).

The round-robin queue works a little differently: after an item is
fetched from that queue (remember this would be an item we already
know about), that request is marked and put back at the end of the
queue.  If that object gets a UDP update while in the queue, that mark
is "cleared".  When it gets to the front of the queue again, if it
still marked, it is thrown away.  If it is not marked, it is fetched,
and again marked and put at the end.  This makes the queue
self-limiting in how big it can get.

I have also made some other changes:
- The sorting comparator now just delegates to the object for its
"interest" calculation.  A higher value = more interesting.
LLVOVolume now uses its PixelArea for its "interest" calculation,
which seems apparently better (the prior distance calculation was
wrong anyway).
- The score is cached before the sort operation is performed, so that
it won't be expensive to sort
- Now, the media version that is fetched is saved in the LLVOVolume,
and we do not update if it is not newer (this is not very
useful...yet.)
- I've introduced hard limits (settable by debug settings) on the size
of the queues.  The sorted queue will be culled (after sort) to that
count. NOTE: this will probably get removed in a later checkin, as
I've already gotten feedback that this is not desirable
- I've reorganized LLMediaDataClient so it makes more sense.
- I've made the request object a little smaller, so the queue won't take up so
much memory (more work could be done here)
- Added a unit test for the two-queue case (though more tests are needed!)
2009-12-10 14:21:48 -08:00
Rick Pasetto c8519c5a7b Code review feedback:
Don't re-sort when adding to the queue: it isn't really necessary
since we sort every time we pull off the queue.
2009-11-24 15:55:53 -08:00
Rick Pasetto f276b73d97 DEV-41998 - refactor mediadataclient to use a std::list, and re-sort every time an item is pulled off the queue
Review #43

This change refactors mediadataclient to no longer use a PriorityQueue (which sorts only on insertion), but rather just use a std::list which is re-sorted on insert, and also when "popped" (at the time the queue timer goes off).

Also implemented a unit test to make sure re-sorting occurs on timer tick.
2009-11-24 14:26:00 -08:00
Rick Pasetto 3bb86f91bc Clean up some logging 2009-11-20 14:01:49 -08:00
Monroe Linden ba3f7965e3 Made LLMediaDataClient not send requests on behalf of objects that are marked as dead.
When LLMediaDataClient::QueueTimer::tick() encounters an object at the head of the queue that's dead, it will now remove that object and loop, instead of sending a request and waiting for the tick timer to fire again.

Added an isDead() function to LLMediaDataClientObject, and an additional unit test that verifies the handling of dead objects.
2009-11-19 16:35:11 -08:00
Rick Pasetto 353ac3969e FIX DEV-41991: do not allow media settings panel to come up if media data is in flight
Review #33

This change marks the current selection "not editable" if
any objects in the selection are currently "in flight" (i.e.
their media data has not been fetched yet, or is in the
process of being fetched).  This involved adding API to
LLMediaDataClient to query whether an object is in the
process of being fetched (i.e. in the queue).  I've added
a unit test for this new API.
2009-11-10 17:24:02 -08:00
Rick Pasetto 6698c681fd Add some logging to perhaps discern more information about reported crashes 2009-10-26 14:06:42 -07:00
Rick Pasetto d78520f6b7 Compress logging of media data (but still have it) 2009-10-19 17:08:45 -07:00