本文整理汇总了C++中WindowSurfaceMap类的典型用法代码示例。如果您正苦于以下问题:C++ WindowSurfaceMap类的具体用法?C++ WindowSurfaceMap怎么用?C++ WindowSurfaceMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WindowSurfaceMap类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWindowSurfaces
bool Display::hasExistingWindowSurface(EGLNativeWindowType window)
{
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces);
return windowSurfaces->find(window) != windowSurfaces->end();
}
示例2: restoreLostDevice
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: ANGLE_TRY
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);
}