Commit Graph

80 Commits (12e50e1fccef153e230f7fe91c1cedbc4e718d53)

Author SHA1 Message Date
Nicky e8bb9d4601 Backout eefd363ebae7 (Crashhunting in LLImageRaw) the assertion got hit and thus the theory that the image gets garbled correct. 2013-04-24 23:43:29 +02:00
Nicky 38ac71c62b Hunting a weird crash. Seems like LLImageRaw can be changed by another thread while one thread tries to read the data. Added a few assertions to test this theory. 2013-04-23 23:58:52 +02:00
Tank_Master 6425b3cd65 Merge RLVa SSB update 2013-02-24 18:24:48 -08:00
Tank_Master e1ee0494bf Merge FS LGPL 2013-02-08 00:14:47 -08:00
Nicky 838d611bcf Handle some out of memory situations a bit more gracefully. 2013-02-07 23:51:49 +01:00
Tank_Master 169263d8b0 Merge LL 3.4.5 beta 3 2013-01-28 01:56:00 -08:00
Nyx Linden 11fe124ae9 merging in viewer-beta.
Most of the merge was clean, a couple conflicts.
Brought over a couple patches manually for llpolymesh.
2013-01-24 16:22:49 -05:00
Nicky 7893cf238d Add ndfile.h into llapr.h so it is visible where needed. Add typedef apr_file_t tFiletype to LLAPRFile and then use this in all classes instead of apr_file_t, this way we can swap between LLAPRFile and ndFile with use a typedef 2013-01-23 02:25:14 +01:00
Don Kjer 802e738b77 Fix for alpha blending using gl fixed-functions not matching shader implementation 2012-12-18 23:40:31 +00:00
Nicky ceea332a9c Change old style comments <ND> to <FS:ND> to avoid any future confusion/ 2012-12-16 05:19:32 +01:00
Tank_Master 5b5f4c8bf5 Merge LL 3.4.2 release,
broken revision, KDU package needs updating, mac packager also likely broken
2012-12-14 07:59:55 -08:00
simon@Simon-PC.lindenlab.com 7f0d6e0377 Pull back viewer-development with latest beta merges 2012-10-16 09:58:31 -07:00
Oz Linden e7a5dc7cda pull back changes from 3.4.1-beta8 2012-10-16 09:36:15 -04:00
Dave Parks c97730988e MAINT-1721 Fix for crash when clicking "back" button after editing appearance.
Reviewed by VoidPointer
2012-10-15 15:59:41 -05:00
simon@Simon-PC.lindenlab.com 38acb45af8 Merge in latest viewer-development 2012-09-05 17:17:54 -07:00
Tank_Master 93d4b47252 Merge LL 3.4.1 beta 10 2012-10-26 09:59:19 -07:00
Dave Parks 4a5ad35793 MAINT-570 Remove unused memory tracking system LLMemType 2012-07-20 11:42:15 -05:00
Xiaohong Bao 0d80aced24 for SH-3073: implement a fast cache system for texture fetching 2012-06-12 17:01:48 -06:00
Merov Linden c410a4e332 SH-3080 : Implement the TextureReverseByteRange setting so we can play with that parameter 2012-04-12 20:19:56 -07:00
Merov Linden 91094d92a7 SH-3060 : Implement new byte range computation, cleaned up use of compression rate as well. 2012-04-05 22:05:00 -07:00
Merov Linden 782981866a SH-3060 : New byte range implementation. Intermediate (not working) state. 2012-04-04 18:58:34 -07:00
Merov Linden df09fd8e8b SH-3060 : Preliminary implementation of the new byte range computation, implement setting to turn it on or off 2012-04-02 19:05:32 -07:00
Merov Linden fe7a4d0183 SH-3047 : Add a load_size argument to llimage_libtest and allow partial image file to be loaded. 2012-03-15 14:07:54 -07:00
Merov Linden bc6f669ff4 SH-3047 : Read the number of levels from the j2c image header instead of relying on hacked computation based on width / height. 2012-03-15 13:01:14 -07:00
Tank_Master 991d43709c merge LL 3.3.3 beta 2012-06-16 07:22:27 -07:00
Xiaohong Bao 83c3d37827 trivial: change a log info for memory failure for LLImageBase 2011-11-30 11:20:26 -07:00
Dave Parks c0ca8e5e2e Merge backout of b782a75c99e6 2011-10-14 11:58:35 -05:00
Dave Parks 4331c112ab Backed out changeset b782a75c99e6 2011-10-14 11:52:40 -05:00
Xiaohong Bao d951267467 Merge from viewer-development 2011-07-15 12:14:34 -06:00
Xiaohong Bao b594d3b04d add debug mode to track the memory allocation/deallocation. 2011-05-10 21:02:20 -06:00
Merov Linden 759d72a46c EXP-669 : Refactor code to use correct LLImageFormatted methods to load images of all formats, reviewed by richard 2011-04-13 14:05:31 -07:00
Xiaohong Bao fc106df530 fix the compiling error: "free" is defined and in use globally. 2011-02-24 19:47:55 -07:00
Xiaohong Bao 108980f68c add types to LLPrivateMemoryPool 2011-02-23 17:53:08 -07:00
Xiaohong Bao 29415d1407 Merge 2011-02-23 13:48:35 -07:00
Xiaohong Bao bfa25219b8 Automated merge with ssh://hg.lindenlab.com/bao/private-memory-pool 2011-02-23 11:10:13 -07:00
Xiaohong Bao 01cdeb0cdd Merge from viewer-development 2011-02-23 10:44:59 -07:00
Aleric Inglewood ef490e308c Introduces a LLThreadLocalData class that can be
accessed through the static LLThread::tldata().
Currently this object contains two (public) thread-local
objects: a LLAPRRootPool and a LLVolatileAPRPool.

The first is the general memory pool used by this thread
(and this thread alone), while the second is intended
for short lived memory allocations (needed for APR).
The advantages of not mixing those two is that the latter
is used most frequently, and as a result of it's nature
can be destroyed and reconstructed on a "regular" basis.

This patch adds LLAPRPool (completely replacing the old one),
which is a wrapper around apr_pool_t* and has complete
thread-safity checking.

Whenever an apr call requires memory for some resource,
a memory pool in the form of an LLAPRPool object can
be created with the same life-time as this resource;
assuring clean up of the memory no sooner, but also
not much later than the life-time of the resource
that needs the memory.

Many, many function calls and constructors had the
pool parameter simply removed (it is no longer the
concern of the developer, if you don't write code
that actually does an libapr call then you are no
longer bothered with memory pools at all).

However, I kept the notion of short-lived and
long-lived allocations alive (see my remark in
the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356
which requires that the LLAPRFile API needs
to allow the user to specify how long they
think a file will stay open. By choosing
'short_lived' as default for the constructor
that immediately opens a file, the number of
instances where this needs to be specified is
drastically reduced however (obviously, any
automatic LLAPRFile is short lived).

***

Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/
regarding (doxygen) comments. This patch effectively only changes comments.

Includes some 'merge' stuff that ended up in llvocache.cpp
(while starting as a bug fix, now only resulting in a cleanup).

***

Added comment 'The use of apr_pool_t is OK here'.

Added this comment on every line where apr_pool_t
is correctly being used.

This should make it easier to spot (future) errors
where someone started to use apr_pool_t; you can
just grep all sources for 'apr_pool_t' and immediately
see where it's being used while LLAPRPool should
have been used.

Note that merging this patch is very easy:
If there are no other uses of apr_pool_t in the code
(one grep) and it compiles, then it will work.

***

Second Merge (needed to remove 'delete mCreationMutex'
from LLImageDecodeThread::~LLImageDecodeThread).

***

Added back #include <apr_pools.h>.

Apparently that is needed on libapr version 1.2.8.,
the version used by Linden Lab, for calls to
apr_queue_*. This is a bug in libapr (we also
include <apr_queue.h>, that is fixed in (at least) 1.3.7.

Note that 1.2.8 is VERY old. Even 1.3.x is old.

***

License fixes (GPL -> LGPL). And typo in comments.
Addresses merov's comments on the review board.

***

Added Merov's compile fixes for windows.
2011-02-05 15:58:07 +01:00
Xiaohong Bao 4af7e9eb64 Merge viewer-development-shining up to REV 3bf724ecb7c6 (fix for SH-829: Viewer attempting to load precached images in file types that are not being used.) 2011-01-21 16:25:23 -07:00
Xiaohong Bao e3f5b66d5a fix for SH-829: Viewer attempting to load precached images in file types that are not being used. 2011-01-20 15:20:27 -07:00
Xiaohong Bao bcb5b209d1 trivial: fix some mac compiling errors 2011-01-12 07:51:14 -08:00
Xiaohong Bao 611d8bdf61 use the private pool in the texture pipeline 2011-01-06 16:20:21 -07:00
Merov Linden dac53830f1 STORM-104 : make kdu statically linked, suppress the need for llkdu 2010-10-27 23:40:35 -07:00
Nicky 349eabb635 Print if/how many textures had been discarded due to low memory. That gives at least a clue why things might begin to look weird with missing textures. 2011-12-17 01:40:46 +01:00
ziree d82625d90b Added control name copy to debug settings, typing in search now auto selects the topmost entry, if any, added warning message to debug settings editor. 2011-12-08 00:15:08 +01:00
Arrehn 7394730eaa Merge up to LL FUI 2011-10-28 02:00:09 -04:00
Nicky 4455fdc6a2 Do not put pointers into the LLColor4U union. That messes everything up when compiling under 64 Bit 2011-09-12 21:51:02 +02:00
Xiaohong Bao 497d35af48 fix for VWR-22813: crash at [1] LLImageBase::allocateData(int) [secondlife-bin llimage.cpp] 2010-09-07 10:48:06 -06:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Xiaohong Bao cd628d8ea8 merge the fix of SNOW-793: memory leak in LLImageFormatted::appendData 2010-08-04 16:58:21 -06:00
Xiaohong Bao 8108de817c EXT-6567: POSSIBLE FIXED: crash at LLImageBase::allocateData [secondlife-bin llimage.cpp:170];
also removed the debug code for this bug.
2010-06-16 11:42:05 -06:00