From 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 11 Jul 2018 18:11:13 +0200 Subject: Roll back to ANGLE/2845 --- gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 44 ++++------------------ 1 file changed, 7 insertions(+), 37 deletions(-) (limited to 'gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp') diff --git a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp index 8696ab0d7..3c02c4a68 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp @@ -26,8 +26,7 @@ SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state, egl::Display *display, const egl::Config *config, EGLNativeWindowType window, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) : SurfaceImpl(state), mRenderer(renderer), @@ -42,39 +41,19 @@ SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state, mWidth(static_cast(attribs.get(EGL_WIDTH, 0))), mHeight(static_cast(attribs.get(EGL_HEIGHT, 0))), mSwapInterval(1), - mShareHandle(0), - mD3DTexture(nullptr) + mShareHandle(reinterpret_cast(shareHandle)) { if (window != nullptr && !mFixedSize) { mWidth = -1; mHeight = -1; } - - switch (buftype) - { - case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE: - mShareHandle = static_cast(clientBuffer); - break; - - case EGL_D3D_TEXTURE_ANGLE: - mD3DTexture = static_cast(clientBuffer); - ASSERT(mD3DTexture != nullptr); - mD3DTexture->AddRef(); - mRenderer->getD3DTextureInfo(mD3DTexture, &mWidth, &mHeight, &mRenderTargetFormat); - mDepthStencilFormat = GL_NONE; - break; - - default: - break; - } } SurfaceD3D::~SurfaceD3D() { releaseSwapChain(); SafeDelete(mNativeWindow); - SafeRelease(mD3DTexture); } void SurfaceD3D::releaseSwapChain() @@ -143,8 +122,8 @@ egl::Error SurfaceD3D::resetSwapChain() height = mHeight; } - mSwapChain = mRenderer->createSwapChain(mNativeWindow, mShareHandle, mD3DTexture, - mRenderTargetFormat, mDepthStencilFormat, mOrientation); + mSwapChain = mRenderer->createSwapChain(mNativeWindow, mShareHandle, mRenderTargetFormat, + mDepthStencilFormat, mOrientation); if (!mSwapChain) { return egl::Error(EGL_BAD_ALLOC); @@ -362,14 +341,7 @@ WindowSurfaceD3D::WindowSurfaceD3D(const egl::SurfaceState &state, const egl::Config *config, EGLNativeWindowType window, const egl::AttributeMap &attribs) - : SurfaceD3D(state, - renderer, - display, - config, - window, - 0, - static_cast(0), - attribs) + : SurfaceD3D(state, renderer, display, config, window, static_cast(0), attribs) { } @@ -381,16 +353,14 @@ PbufferSurfaceD3D::PbufferSurfaceD3D(const egl::SurfaceState &state, RendererD3D *renderer, egl::Display *display, const egl::Config *config, - EGLenum buftype, - EGLClientBuffer clientBuffer, + EGLClientBuffer shareHandle, const egl::AttributeMap &attribs) : SurfaceD3D(state, renderer, display, config, static_cast(0), - buftype, - clientBuffer, + shareHandle, attribs) { } -- cgit v1.2.3