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


C++ CDirtyRegionList::end方法代码示例

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


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

示例1: Render

bool CGUIWindowManager::Render()
{
/*
	参数:
		1、

	返回:
		1、

	说明:
		1、
*/
	assert(g_application.IsCurrentThread());
	CSingleLock lock(g_graphicsContext);

	CDirtyRegionList dirtyRegions = m_tracker.GetDirtyRegions();

	bool hasRendered = false;
	// If we visualize the regions we will always render the entire viewport
	if (g_advancedSettings.m_guiVisualizeDirtyRegions || g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ALWAYS)
	{
		RenderPass();
		hasRendered = true;
	}
	else if (g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ON_CHANGE)
	{
		if (dirtyRegions.size() > 0)
		{
			RenderPass();
			hasRendered = true;
		}
	}
	else
	{
		for (CDirtyRegionList::const_iterator i = dirtyRegions.begin(); i != dirtyRegions.end(); i++)
		{
			if (i->IsEmpty())
				continue;

			g_graphicsContext.SetScissors(*i);
			RenderPass();
			hasRendered = true;
		}
		g_graphicsContext.ResetScissors();
	}

	if (g_advancedSettings.m_guiVisualizeDirtyRegions)
	{
		g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), false);
		const CDirtyRegionList &markedRegions  = m_tracker.GetMarkedRegions(); 
		for (CDirtyRegionList::const_iterator i = markedRegions.begin(); i != markedRegions.end(); i++)
			CGUITexture::DrawQuad(*i, 0x0fff0000);
		for (CDirtyRegionList::const_iterator i = dirtyRegions.begin(); i != dirtyRegions.end(); i++)
			CGUITexture::DrawQuad(*i, 0x4c00ff00);
	}

	m_tracker.CleanMarkedRegions();

	return hasRendered;
}
开发者ID:,项目名称:,代码行数:60,代码来源:

示例2: Process

void CGUIWindowManager::Process(unsigned int currentTime)
{
  assert(g_application.IsCurrentThread());
  CSingleLock lock(g_graphicsContext);

  CDirtyRegionList dirtyregions;

  CGUIWindow* pWindow = GetWindow(GetActiveWindow());
  if (pWindow)
    pWindow->DoProcess(currentTime, dirtyregions);

  // process all dialogs - visibility may change etc.
  for (WindowMap::iterator it = m_mapWindows.begin(); it != m_mapWindows.end(); it++)
  {
    CGUIWindow *pWindow = (*it).second;
    if (pWindow && pWindow->IsDialog())
      pWindow->DoProcess(currentTime, dirtyregions);
  }

  if (g_application.m_AppActive)
  {
    for (CDirtyRegionList::iterator itr = dirtyregions.begin(); itr != dirtyregions.end(); itr++)
      m_tracker.MarkDirtyRegion(*itr);
  }
}
开发者ID:mikedoner,项目名称:xbmc,代码行数:25,代码来源:GUIWindowManager.cpp


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