summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimageworker.cpp17
-rw-r--r--indra/llimage/llimageworker.h4
2 files changed, 13 insertions, 8 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index 3c21499673..0093958e6d 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -34,15 +34,17 @@
class ImageRequest
{
public:
- ImageRequest(LLPointer<LLImageFormatted> image,
+ ImageRequest(const LLPointer<LLImageFormatted>& image,
S32 discard, BOOL needs_aux,
- LLPointer<LLImageDecodeThread::Responder> responder);
+ const LLPointer<LLImageDecodeThread::Responder>& responder);
virtual ~ImageRequest();
/*virtual*/ bool processRequest();
/*virtual*/ void finishRequest(bool completed);
private:
+ // LLPointers stored in ImageRequest MUST be LLPointer instances rather
+ // than references: we need to increment the refcount when storing these.
// input
LLPointer<LLImageFormatted> mFormattedImage;
S32 mDiscardLevel;
@@ -82,8 +84,11 @@ S32 LLImageDecodeThread::getPending()
return mThreadPool->getQueue().size();
}
-LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLPointer<LLImageFormatted> image,
- S32 discard, BOOL needs_aux, LLPointer<LLImageDecodeThread::Responder> responder)
+LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(
+ const LLPointer<LLImageFormatted>& image,
+ S32 discard,
+ BOOL needs_aux,
+ const LLPointer<LLImageDecodeThread::Responder>& responder)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -113,9 +118,9 @@ LLImageDecodeThread::Responder::~Responder()
//----------------------------------------------------------------------------
-ImageRequest::ImageRequest(LLPointer<LLImageFormatted> image,
+ImageRequest::ImageRequest(const LLPointer<LLImageFormatted>& image,
S32 discard, BOOL needs_aux,
- LLPointer<LLImageDecodeThread::Responder> responder)
+ const LLPointer<LLImageDecodeThread::Responder>& responder)
: mFormattedImage(image),
mDiscardLevel(discard),
mNeedsAux(needs_aux),
diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h
index 6a0b2b4681..18398d9ae2 100644
--- a/indra/llimage/llimageworker.h
+++ b/indra/llimage/llimageworker.h
@@ -52,9 +52,9 @@ public:
// meant to resemble LLQueuedThread::handle_t
typedef U32 handle_t;
- handle_t decodeImage(LLPointer<LLImageFormatted> image,
+ handle_t decodeImage(const LLPointer<LLImageFormatted>& image,
S32 discard, BOOL needs_aux,
- LLPointer<Responder> responder);
+ const LLPointer<Responder>& responder);
S32 getPending();
S32 update(F32 max_time_ms);
void shutdown();