summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.h
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2023-01-02 23:04:02 +0100
committerKitty Barnett <develop@catznip.com>2023-01-02 23:04:42 +0100
commit6850b915fe42f5a75fc9d8bb9ca05f961de3244a (patch)
tree0921b5e0c74a64ad65d1b5702b00142badb6140c /indra/newview/llviewertexture.h
parent89456ec88df01565e2c9a424a0097a5a02e1838c (diff)
parentf3f3c493ec2a658cf5c1aac6670c54c550e944fd (diff)
Merge branch 'master' into texture-preview
Diffstat (limited to 'indra/newview/llviewertexture.h')
-rw-r--r--indra/newview/llviewertexture.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 0de49073c8..2f5e0d01df 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -27,6 +27,7 @@
#ifndef LL_LLVIEWERTEXTURE_H
#define LL_LLVIEWERTEXTURE_H
+#include "llatomic.h"
#include "llgltexture.h"
#include "lltimer.h"
#include "llframetimer.h"
@@ -35,6 +36,7 @@
#include "llrender.h"
#include "llmetricperformancetester.h"
#include "httpcommon.h"
+#include "workqueue.h"
#include <map>
#include <list>
@@ -114,7 +116,7 @@ protected:
public:
static void initClass();
- static void updateClass(const F32 velocity, const F32 angular_velocity) ;
+ static void updateClass();
LLViewerTexture(BOOL usemipmaps = TRUE);
LLViewerTexture(const LLUUID& id, BOOL usemipmaps) ;
@@ -213,6 +215,9 @@ protected:
//do not use LLPointer here.
LLViewerMediaTexture* mParcelMedia ;
+ LL::WorkQueue::weak_t mMainQueue;
+ LL::WorkQueue::weak_t mImageQueue;
+
static F32 sTexelPixelRatio;
public:
static const U32 sCurrentFileVersion;
@@ -321,9 +326,13 @@ public:
void addToCreateTexture();
-
- // ONLY call from LLViewerTextureList
+ //call to determine if createTexture is necessary
+ BOOL preCreateTexture(S32 usename = 0);
+ // ONLY call from LLViewerTextureList or ImageGL background thread
BOOL createTexture(S32 usename = 0);
+ void postCreateTexture();
+ void scheduleCreateTexture();
+
void destroyTexture() ;
virtual void processTextureStats() ;
@@ -520,7 +529,9 @@ protected:
LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f.
BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!)
- BOOL mNeedsCreateTexture;
+ // This needs to be atomic, since it is written both in the main thread
+ // and in the GL image worker thread... HB
+ LLAtomicBool mNeedsCreateTexture;
BOOL mForSculpt ; //a flag if the texture is used as sculpt data.
BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally.