Revert regression from merge
This commit is contained in:
@@ -93,7 +93,7 @@ LLMediaCtrl::LLMediaCtrl( const std::string& name, const LLRect& rect ) :
|
||||
if ( !mMediaSource )
|
||||
{
|
||||
llwarns << "media source create failed " << llendl;
|
||||
// return;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -123,7 +123,6 @@ LLMediaCtrl::~LLMediaCtrl()
|
||||
|
||||
if ( mWebBrowserImage )
|
||||
{
|
||||
delete mWebBrowserImage;
|
||||
mWebBrowserImage = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class LLMediaCtrl :
|
||||
static bool onClickLinkExternalTarget( const LLSD&, const LLSD& );
|
||||
|
||||
const S32 mTextureDepthBytes;
|
||||
LLWebBrowserTexture* mWebBrowserImage;
|
||||
LLPointer<LLWebBrowserTexture> mWebBrowserImage;
|
||||
LLViewBorder* mBorder;
|
||||
bool mFrequentUpdates;
|
||||
bool mForceUpdate;
|
||||
|
||||
@@ -376,6 +376,8 @@ LLViewerMediaImpl::LLViewerMediaImpl(const std::string& media_url,
|
||||
mMediaURL(media_url),
|
||||
mMimeType(mime_type),
|
||||
mNeedsNewTexture(true),
|
||||
mTextureUsedWidth(0),
|
||||
mTextureUsedHeight(0),
|
||||
mSuspendUpdates(false),
|
||||
mVisible(true)
|
||||
{
|
||||
@@ -898,8 +900,8 @@ void LLViewerMediaImpl::updateMovieImage(const LLUUID& uuid, BOOL active)
|
||||
// Can't use mipmaps for movies because they don't update the full image
|
||||
// Casting to LLViewerMediaTexture is a huge hack. Implement LLViewerMediaTexture some time later.
|
||||
mMovieImageHasMips = ((LLViewerMediaTexture*)viewerImage)->getUseMipMaps();
|
||||
((LLViewerMediaTexture*)viewerImage)->reinit(mMovieImageHasMips);
|
||||
viewerImage->mIsMediaTexture = FALSE;
|
||||
((LLViewerMediaTexture*)viewerImage)->reinit(FALSE);
|
||||
viewerImage->mIsMediaTexture = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -985,13 +987,16 @@ void LLViewerMediaImpl::updateImagesMediaStreams()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLViewerTexture* placeholder_image = LLViewerTextureManager::findTexture( mTextureId );
|
||||
LLViewerMediaTexture* placeholder_image = (LLViewerMediaTexture*)LLViewerTextureManager::findTexture( mTextureId );
|
||||
|
||||
if (mNeedsNewTexture
|
||||
|| ((LLViewerMediaTexture*)placeholder_image)->getUseMipMaps()
|
||||
|| placeholder_image->getUseMipMaps()
|
||||
|| ! placeholder_image->mIsMediaTexture
|
||||
|| placeholder_image->getWidth() != mMediaSource->getTextureWidth()
|
||||
|| placeholder_image->getHeight() != mMediaSource->getTextureHeight())
|
||||
|| (placeholder_image->getWidth() != mMediaSource->getTextureWidth())
|
||||
|| (placeholder_image->getHeight() != mMediaSource->getTextureHeight())
|
||||
|| (mTextureUsedWidth != mMediaSource->getWidth())
|
||||
|| (mTextureUsedHeight != mMediaSource->getHeight())
|
||||
)
|
||||
{
|
||||
llinfos << "initializing media placeholder" << llendl;
|
||||
llinfos << "movie image id " << mTextureId << llendl;
|
||||
@@ -1003,7 +1008,7 @@ void LLViewerMediaImpl::updateImagesMediaStreams()
|
||||
// MEDIAOPT: check to see if size actually changed before doing work
|
||||
placeholder_image->destroyGLTexture();
|
||||
// MEDIAOPT: apparently just calling setUseMipMaps(FALSE) doesn't work?
|
||||
((LLViewerMediaTexture*)placeholder_image)->reinit(FALSE); // probably not needed
|
||||
placeholder_image->reinit(FALSE); // probably not needed
|
||||
|
||||
// MEDIAOPT: seems insane that we actually have to make an imageraw then
|
||||
// immediately discard it
|
||||
@@ -1020,11 +1025,16 @@ void LLViewerMediaImpl::updateImagesMediaStreams()
|
||||
placeholder_image->createGLTexture(discard_level, raw);
|
||||
|
||||
// placeholder_image->setExplicitFormat()
|
||||
((LLViewerMediaTexture*)placeholder_image)->setUseMipMaps(FALSE);
|
||||
placeholder_image->setUseMipMaps(FALSE);
|
||||
|
||||
// MEDIAOPT: set this dynamically on play/stop
|
||||
((LLViewerMediaTexture*)placeholder_image)->mIsMediaTexture = true;
|
||||
placeholder_image->mIsMediaTexture = true;
|
||||
mNeedsNewTexture = false;
|
||||
|
||||
// If the amount of the texture being drawn by the media goes down in either width or height,
|
||||
// recreate the texture to avoid leaving parts of the old image behind.
|
||||
mTextureUsedWidth = mMediaSource->getWidth();
|
||||
mTextureUsedHeight = mMediaSource->getHeight();
|
||||
}
|
||||
|
||||
return placeholder_image;
|
||||
|
||||
@@ -214,6 +214,8 @@ public:
|
||||
bool mMediaAutoScale;
|
||||
bool mMediaLoop;
|
||||
bool mNeedsNewTexture;
|
||||
S32 mTextureUsedWidth;
|
||||
S32 mTextureUsedHeight;
|
||||
bool mSuspendUpdates;
|
||||
bool mVisible;
|
||||
|
||||
|
||||
@@ -3474,7 +3474,7 @@ void LLPipeline::renderDebug()
|
||||
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get());
|
||||
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
|
||||
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include <stack>
|
||||
|
||||
class LLViewerImage;
|
||||
class LLViewerTexture;
|
||||
class LLEdge;
|
||||
class LLFace;
|
||||
class LLViewerObject;
|
||||
@@ -107,15 +107,15 @@ public:
|
||||
|
||||
/// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture.
|
||||
/// @return Draw pool, or NULL if not found.
|
||||
LLDrawPool *findPool(const U32 pool_type, LLViewerImage *tex0 = NULL);
|
||||
LLDrawPool *findPool(const U32 pool_type, LLViewerTexture *tex0 = NULL);
|
||||
|
||||
/// @brief Get a draw pool for faces of the appropriate type and texture. Create if necessary.
|
||||
/// @return Always returns a draw pool.
|
||||
LLDrawPool *getPool(const U32 pool_type, LLViewerImage *tex0 = NULL);
|
||||
LLDrawPool *getPool(const U32 pool_type, LLViewerTexture *tex0 = NULL);
|
||||
|
||||
/// @brief Figures out draw pool type from texture entry. Creates pool if necessary.
|
||||
static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerImage* te_image);
|
||||
static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* imagep);
|
||||
static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* te_image);
|
||||
static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep);
|
||||
|
||||
void addPool(LLDrawPool *poolp); // Only to be used by LLDrawPool classes for splitting pools!
|
||||
void removePool( LLDrawPool* poolp );
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
);
|
||||
|
||||
// Something about these textures has changed. Dirty them.
|
||||
void dirtyPoolObjectTextures(const std::set<LLViewerImage*>& textures);
|
||||
void dirtyPoolObjectTextures(const std::set<LLViewerFetchedTexture*>& textures);
|
||||
|
||||
void resetDrawOrders();
|
||||
|
||||
@@ -603,7 +603,7 @@ public:
|
||||
protected:
|
||||
std::vector<LLFace*> mSelectedFaces;
|
||||
|
||||
LLPointer<LLViewerImage> mFaceSelectImagep;
|
||||
LLPointer<LLViewerFetchedTexture> mFaceSelectImagep;
|
||||
|
||||
U32 mLightMask;
|
||||
U32 mLightMovingMask;
|
||||
|
||||
Reference in New Issue
Block a user