diff options
author | Merov Linden <merov@lindenlab.com> | 2014-01-28 10:19:57 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-01-28 10:19:57 -0800 |
commit | 6bf3cb875cef4da7c35850ebbea5100dc5244601 (patch) | |
tree | 538280be6e5dafda5f648d985f7e8104690c718d /indra/newview/llsnapshotlivepreview.h | |
parent | ff3edd06d2c824a32753e689de3369abf593c684 (diff) |
ACME-1195 : WIP : Lazy evaluate intermediate images in snapshot preview so perf is better in common cases, allow thumbnail to be computed from grabed frame (for SL Share), thumbnail display still buggy in SL Share
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.h')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 6addc87de2..4fd6dedeed 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -70,6 +70,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,9 +86,10 @@ 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; } @@ -96,14 +100,14 @@ public: bool setSnapshotQuality(S32 quality, bool set_by_user = true); void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void setFilter(std::string filter_name) { mFilterName = filter_name; } - std::string getFilter() { return mFilterName; } + 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. void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; } @@ -135,8 +139,10 @@ private: BOOL mThumbnailUpdateLock ; BOOL mThumbnailUpToDate ; LLRect mThumbnailPlaceholderRect; + BOOL mThumbnailSubsampled; // TRUE is the thumbnail is a subsampled version of the mPreviewImage 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; |