当前位置: 首页>>代码示例>>C++>>正文


C++ CTextureMap::Release方法代码示例

本文整理汇总了C++中CTextureMap::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ CTextureMap::Release方法的具体用法?C++ CTextureMap::Release怎么用?C++ CTextureMap::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTextureMap的用法示例。


在下文中一共展示了CTextureMap::Release方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReleaseTexture

void CGUITextureManager::ReleaseTexture(const CStdString& strTextureName, int iPicture)
{
  CSingleLock lock(g_graphicsContext);

#ifndef _LINUX
  MEMORYSTATUS stat;
  GlobalMemoryStatus(&stat);
  DWORD dwMegFree = stat.dwAvailPhys / (1024 * 1024);
  if (dwMegFree > 29)
  {
    // dont release skin textures, they are reloaded each time
    //if (strTextureName.GetAt(1) != ':') return;
    //CLog::Log(LOGINFO, "release:%s", strTextureName.c_str());
  }
#endif

  ivecTextures i;
  i = m_vecTextures.begin();
  while (i != m_vecTextures.end())
  {
    CTextureMap* pMap = *i;
    if (pMap->GetName() == strTextureName)
    {
      pMap->Release(iPicture);

      if (pMap->IsEmpty() )
      {
        //CLog::Log(LOGINFO, "  cleanup:%s", strTextureName.c_str());
        delete pMap;
        i = m_vecTextures.erase(i);
      }
      return;
    }
    ++i;
  }
  CLog::Log(LOGWARNING, "%s: Unable to release texture %s", __FUNCTION__, strTextureName.c_str());
}
开发者ID:Castlecard,项目名称:plex,代码行数:37,代码来源:TextureManager.cpp

示例2: ReleaseTexture

void CGUITextureManager::ReleaseTexture(const std::string& strTextureName, bool immediately /*= false */)
{
    CSingleLock lock(g_graphicsContext);

    ivecTextures i;
    i = m_vecTextures.begin();
    while (i != m_vecTextures.end())
    {
        CTextureMap* pMap = *i;
        if (pMap->GetName() == strTextureName)
        {
            if (pMap->Release())
            {
                //CLog::Log(LOGINFO, "  cleanup:%s", strTextureName.c_str());
                // add to our textures to free
                m_unusedTextures.push_back(std::make_pair(pMap, immediately ? 0 : XbmcThreads::SystemClockMillis()));
                i = m_vecTextures.erase(i);
            }
            return;
        }
        ++i;
    }
    CLog::Log(LOGWARNING, "%s: Unable to release texture %s", __FUNCTION__, strTextureName.c_str());
}
开发者ID:deniscostadsc,项目名称:xbmc,代码行数:24,代码来源:TextureManager.cpp

示例3: ReleaseTexture

void CGUITextureManager::ReleaseTexture(const CStdString& strTextureName)
{
  CSingleLock lock(g_graphicsContext);

  ivecTextures i;
  i = m_vecTextures.begin();
  while (i != m_vecTextures.end())
  {
    CTextureMap* pMap = *i;
    if (pMap->GetName() == strTextureName)
    {
      if (pMap->Release())
      {
        //CLog::Log(LOGINFO, "  cleanup:%s", strTextureName.c_str());
        // add to our textures to free
        m_unusedTextures.push_back(pMap);
        i = m_vecTextures.erase(i);
      }
      return;
    }
    ++i;
  }
  CLog::Log(LOGWARNING, "%s: Unable to release texture %s", __FUNCTION__, strTextureName.c_str());
}
开发者ID:WilliamRen,项目名称:xbmc,代码行数:24,代码来源:TextureManager.cpp


注:本文中的CTextureMap::Release方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。