Commit Graph

26 Commits (bd008a170898e69beeb8bc0481b4bfd94de86c55)

Author SHA1 Message Date
ruslantproductengine 84e5dc37b6 MAINT-7847 The presence of certain Avatars stops local specular textures from "sticking". Yes really.
FIXED. Allows set material explicitly to material manager.
2018-02-14 20:52:31 +02:00
Nat Goodspeed d2c3c2f9fe MAINT-5232: Normalize LLSingleton subclasses.
A shocking number of LLSingleton subclasses had public constructors -- and in
several instances, were being explicitly instantiated independently of the
LLSingleton machinery. This breaks the new LLSingleton dependency-tracking
machinery. It seems only fair that if you say you want an LLSingleton, there
should only be ONE INSTANCE!

Introduce LLSINGLETON() and LLSINGLETON_EMPTY_CTOR() macros. These handle the
friend class LLSingleton<whatevah>;
and explicitly declare a private nullary constructor.

To try to enforce the LLSINGLETON() convention, introduce a new pure virtual
LLSingleton method you_must_use_LLSINGLETON_macro() which is, as you might
suspect, defined by the macro. If you declare an LLSingleton subclass without
using LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() in the class body, you can't
instantiate the subclass for lack of a you_must_use_LLSINGLETON_macro()
implementation -- which will hopefully remind the coder.

Trawl through ALL LLSingleton subclass definitions, sprinkling in
LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() as appropriate. Remove all explicit
constructor declarations, public or private, along with relevant 'friend class
LLSingleton<myself>' declarations. Where destructors are declared, move them
into private section as well. Where the constructor was inline but nontrivial,
move out of class body.

Fix several LLSingleton abuses revealed by making ctors/dtors private:

LLGlobalEconomy was both an LLSingleton and the base class for
LLRegionEconomy, a non-LLSingleton. (Therefore every LLRegionEconomy instance
contained another instance of the LLGlobalEconomy "singleton.") Extract
LLBaseEconomy; LLGlobalEconomy is now a trivial subclass of that.
LLRegionEconomy, as you might suspect, now derives from LLBaseEconomy.

LLToolGrab, an LLSingleton, was also explicitly instantiated by
LLToolCompGun's constructor. Extract LLToolGrabBase, explicitly instantiated,
with trivial subclass LLToolGrab, the LLSingleton instance.

(WARNING: LLToolGrabBase methods have an unnerving tendency to go after
LLToolGrab::getInstance(). I DO NOT KNOW what should be the relationship
between the instance in LLToolCompGun and the LLToolGrab singleton instance.)

LLGridManager declared a variant constructor accepting (const std::string&),
with the comment:
// initialize with an explicity grid file for testing.
As there is no evidence of this being called from anywhere, delete it.

LLChicletBar's constructor accepted an optional (const LLSD&). As the LLSD
parameter wasn't used, and as there is no evidence of it being passed from
anywhere, delete the parameter.

LLViewerWindow::shutdownViews() was checking LLNavigationBar::
instanceExists(), then deleting its getInstance() pointer -- leaving a
dangling LLSingleton instance pointer, a land mine if any subsequent code
should attempt to reference it. Use deleteSingleton() instead.

~LLAppViewer() was calling LLViewerEventRecorder::instance() and then
explicitly calling ~LLViewerEventRecorder() on that instance -- leaving the
LLSingleton instance pointer pointing to an allocated-but-destroyed instance.
Use deleteSingleton() instead.
2016-09-15 20:18:12 -04: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 9d676ce5b9 Clean up and use policies for Material transfer. 2015-03-20 13:16:25 -07:00
Rider Linden 6b8c814df3 Adding new HTTP handling for material manager. 2015-03-19 17:01:21 -07:00
Oz Linden 1c6783fdb5 NORSPEC-29: use the MaxMaterialsPerTransaction simulator feature if available 2013-06-26 09:43:01 -04:00
Graham Madarasz 66e5375967 NORSPEC-96 NORSPEC-189 another attempt at planar stretch across all 3 channels and make the materials CB use a UUID instead of this pointer for safety 2013-05-24 15:07:23 -07:00
Graham Madarasz 0004f418f4 NORSPEC-210 fix issues with the map used to store TE-specific registrations which was only invoking the CB for the last TE on log-in by replacing std::map with boost::unordered_map 2013-05-24 04:46:18 -07:00
Graham Madarasz 33f674a0d0 NORSPEC-208 re-enable TE-specific material mgr registration to avoid cross-talk when editing faces 2013-05-23 11:40:45 -07:00
Graham Madarasz (Graham) 74c1bc29e7 NORSPEC-189 restore old mat param update registration 2013-05-17 14:02:31 -07:00
Graham Madarasz 666896ac4e NORSPEC-119 put back TE-specific get registration in material manager stomped during 'reloading'. 2013-05-15 17:00:13 -07:00
Kitty Barnett ad09e2111c NORSPEC-102 & Co Reloaded 2013-05-14 21:14:46 +02:00
Graham Madarasz d9e8ee7cfd NORSPEC-178 NORSPEC-179 NORSPEC-180 made enable/disable handling more consistent and increased max range on repeats per meter 2013-05-13 13:02:53 -07:00
Kitty Barnett c2c9380fe1 Avoid code duplication in LLMaterialMgr 2013-05-12 13:02:54 +02:00
Graham Madarasz f356d7eb9f Fix many issues with selection misapplication and rendering not matching applied materials 2013-05-11 19:58:56 -07:00
Kitty Barnett 5ba7be0812 Mark a material as 'pending' from the very first call to LLMaterialMgr::get() 2013-02-28 23:19:41 +01:00
Kitty Barnett fbf8e51c60 Added LLMaterialMgr::remove() to remove material information from a face 2013-02-25 00:16:14 +01:00
Kitty Barnett b4a87776d4 Prevent a failed GET from causing an infinite material request loop when there are still pending POST requests for the same region 2013-02-18 19:37:19 +01:00
Oz Linden d4910e15a6 changes needed to compile with Linden-standard toolchain 2013-01-03 14:14:43 -05:00
Kitty Barnett a18ea9d929 Clean up pending requests when regions are removed from LLWorld 2012-12-12 21:47:24 +01:00
Kitty Barnett ef301c5983 Don't call setTEMaterialID() while processing a PUT response; the region will send its own ObjectUpdate message 2012-12-12 21:36:36 +01:00
Kitty Barnett 3cd0474912 Refactor material retrieval to always invoke the region's GET material cap first 2012-12-12 20:39:47 +01:00
Kitty Barnett 4c68faec40 Added LLMaterialMgr::getAll() to retrieve all materials for the specified region 2012-12-05 19:34:27 +01:00
Kitty Barnett 1e194eb412 Handle delayed requesting and sending of materials through an idle callback 2012-12-03 15:46:49 +01:00
Kitty Barnett 25bffc3d43 Added LLMaterialMgr::get() to retrieve individual materials (with optional callback) 2012-12-03 15:20:11 +01:00
Kitty Barnett 1e26dbdcd2 Started LLMaterialMgr to handle viewer<->region materials communication
* refactored LLFloaterDebugMaterials::requestPutMaterials() to use LLMaterialMgr instead
  * replaced "Object editing" results list with information about the active selection instead
2012-12-03 01:46:26 +01:00