summaryrefslogtreecommitdiff
path: root/indra/newview/llsnapshotlivepreview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.h')
-rw-r--r--indra/newview/llsnapshotlivepreview.h40
1 files changed, 34 insertions, 6 deletions
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index fe3d257b02..7e19f77e26 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -28,6 +28,7 @@
#define LL_LLSNAPSHOTLIVEPREVIEW_H
#include "llpanelsnapshot.h"
+#include "llviewertexture.h"
#include "llviewerwindow.h"
class LLImageJPEG;
@@ -61,6 +62,8 @@ public:
LLSnapshotLivePreview(const LLSnapshotLivePreview::Params& p);
~LLSnapshotLivePreview();
+ void setContainer(LLView* container) { mViewContainer = container; }
+
/*virtual*/ void draw();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
@@ -70,6 +73,9 @@ public:
void getSize(S32& w, S32& h) const;
S32 getWidth() const { return mWidth[mCurImageIndex]; }
S32 getHeight() const { return mHeight[mCurImageIndex]; }
+ S32 getEncodedImageWidth() const;
+ S32 getEncodedImageHeight() const;
+ void estimateDataSize();
S32 getDataSize() const { return mDataSize; }
void setMaxImageSize(S32 size) ;
S32 getMaxImageSize() {return mMaxImageSize ;}
@@ -83,33 +89,43 @@ public:
S32 getThumbnailHeight() const { return mThumbnailHeight ; }
BOOL getThumbnailLock() const { return mThumbnailUpdateLock ; }
BOOL getThumbnailUpToDate() const { return mThumbnailUpToDate ;}
+ void setThumbnailSubsampled(BOOL subsampled) { mThumbnailSubsampled = subsampled; }
+
LLViewerTexture* getCurrentImage();
F32 getImageAspect();
- F32 getAspect() ;
const LLRect& getImageRect() const { return mImageRect[mCurImageIndex]; }
BOOL isImageScaled() const { return mImageScaled[mCurImageIndex]; }
void setImageScaled(BOOL scaled) { mImageScaled[mCurImageIndex] = scaled; }
const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; }
void setSnapshotType(ESnapshotType type) { mSnapshotType = type; }
- void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat type) { mSnapshotFormat = type; }
- void setSnapshotQuality(S32 quality);
+ void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat format);
+ bool setSnapshotQuality(S32 quality, bool set_by_user = true);
void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; }
+ void setAllowRenderUI(BOOL allow) { mAllowRenderUI = allow; }
+ void setAllowFullScreenPreview(BOOL allow) { mAllowFullScreenPreview = allow; }
+ void setFilter(std::string filter_name) { mFilterName = filter_name; }
+ std::string getFilter() const { return mFilterName; }
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
void saveWeb();
void saveTexture();
BOOL saveLocal();
- LLPointer<LLImageFormatted> getFormattedImage() const { return mFormattedImage; }
- LLPointer<LLImageRaw> getEncodedImage() const { return mPreviewImageEncoded; }
+ LLPointer<LLImageFormatted> getFormattedImage();
+ LLPointer<LLImageRaw> getEncodedImage();
- /// Sets size of preview thumbnail image and thhe surrounding rect.
+ /// Sets size of preview thumbnail image and the surrounding rect.
void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; }
BOOL setThumbnailImageSize() ;
void generateThumbnailImage(BOOL force_update = FALSE) ;
void resetThumbnailImage() { mThumbnailImage = NULL ; }
void drawPreviewRect(S32 offset_x, S32 offset_y) ;
+
+ LLViewerTexture* getBigThumbnailImage();
+ S32 getBigThumbnailWidth() const { return mBigThumbnailWidth ; }
+ S32 getBigThumbnailHeight() const { return mBigThumbnailHeight ; }
+
// Returns TRUE when snapshot generated, FALSE otherwise.
static BOOL onIdle( void* snapshot_preview );
@@ -117,6 +133,8 @@ public:
void regionNameCallback(LLImageJPEG* snapshot, LLSD& metadata, const std::string& name, S32 x, S32 y, S32 z);
private:
+ LLView* mViewContainer;
+
LLColor4 mColor;
LLPointer<LLViewerTexture> mViewerImage[2]; //used to represent the scene when the frame is frozen.
LLRect mImageRect[2];
@@ -133,11 +151,20 @@ private:
BOOL mThumbnailUpdateLock ;
BOOL mThumbnailUpToDate ;
LLRect mThumbnailPlaceholderRect;
+ BOOL mThumbnailSubsampled; // TRUE if the thumbnail is a subsampled version of the mPreviewImage
+
+ LLPointer<LLViewerTexture> mBigThumbnailImage ;
+ S32 mBigThumbnailWidth;
+ S32 mBigThumbnailHeight;
+ BOOL mBigThumbnailUpToDate;
S32 mCurImageIndex;
+ // The logic is mPreviewImage (raw frame) -> mFormattedImage (formatted / filtered) -> mPreviewImageEncoded (decoded back, to show artifacts)
LLPointer<LLImageRaw> mPreviewImage;
LLPointer<LLImageRaw> mPreviewImageEncoded;
LLPointer<LLImageFormatted> mFormattedImage;
+ BOOL mAllowRenderUI;
+ BOOL mAllowFullScreenPreview;
LLFrameTimer mSnapshotDelayTimer;
S32 mShineCountdown;
LLFrameTimer mShineAnimTimer;
@@ -154,6 +181,7 @@ private:
LLQuaternion mCameraRot;
BOOL mSnapshotActive;
LLViewerWindow::ESnapshotType mSnapshotBufferType;
+ std::string mFilterName;
public:
static std::set<LLSnapshotLivePreview*> sList;