本文整理汇总了C++中WindowSurfaceMap::end方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowSurfaceMap::end方法的具体用法?C++ WindowSurfaceMap::end怎么用?C++ WindowSurfaceMap::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowSurfaceMap
的用法示例。
在下文中一共展示了WindowSurfaceMap::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hasExistingWindowSurface
bool Display::hasExistingWindowSurface(EGLNativeWindowType window)
{
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces);
return windowSurfaces->find(window) != windowSurfaces->end();
}
示例2: createWindowSurface
Error Display::createWindowSurface(const Config *configuration, EGLNativeWindowType window, const AttributeMap &attribs,
Surface **outSurface)
{
if (mImplementation->testDeviceLost())
{
Error error = restoreLostDevice();
if (error.isError())
{
return error;
}
}
rx::SurfaceImpl *surfaceImpl = mImplementation->createWindowSurface(configuration, window, attribs);
ASSERT(surfaceImpl != nullptr);
Error error = surfaceImpl->initialize();
if (error.isError())
{
SafeDelete(surfaceImpl);
return error;
}
Surface *surface = new Surface(surfaceImpl, EGL_WINDOW_BIT, configuration, attribs);
mImplementation->getSurfaceSet().insert(surface);
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces && windowSurfaces->find(window) == windowSurfaces->end());
windowSurfaces->insert(std::make_pair(window, surface));
ASSERT(outSurface != nullptr);
*outSurface = surface;
return Error(EGL_SUCCESS);
}
示例3: createWindowSurface
Error Display::createWindowSurface(const Config *configuration, EGLNativeWindowType window, const AttributeMap &attribs,
Surface **outSurface)
{
if (mImplementation->testDeviceLost())
{
ANGLE_TRY(restoreLostDevice());
}
std::unique_ptr<Surface> surface(
new WindowSurface(mImplementation, configuration, window, attribs));
ANGLE_TRY(surface->initialize());
ASSERT(outSurface != nullptr);
*outSurface = surface.release();
mImplementation->getSurfaceSet().insert(*outSurface);
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces && windowSurfaces->find(window) == windowSurfaces->end());
windowSurfaces->insert(std::make_pair(window, *outSurface));
return egl::Error(EGL_SUCCESS);
}
示例4: destroySurface
void Display::destroySurface(Surface *surface)
{
if (surface->getType() == EGL_WINDOW_BIT)
{
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces);
bool surfaceRemoved = false;
for (WindowSurfaceMap::iterator iter = windowSurfaces->begin(); iter != windowSurfaces->end(); iter++)
{
if (iter->second == surface)
{
windowSurfaces->erase(iter);
surfaceRemoved = true;
break;
}
}
ASSERT(surfaceRemoved);
UNUSED_ASSERTION_VARIABLE(surfaceRemoved);
}
mImplementation->destroySurface(surface);
}