diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
commit | fc61780b35af913801d72086456f493f63197da6 (patch) | |
tree | f85891288a7bd988da9f0f15ae64e5c63f00d493 /gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | |
parent | 69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff) | |
parent | 50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff) | |
download | UXP-2018.07.18.tar UXP-2018.07.18.tar.gz UXP-2018.07.18.tar.lz UXP-2018.07.18.tar.xz UXP-2018.07.18.zip |
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts:
# browser/app/profile/firefox.js
# browser/components/preferences/jar.mn
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 44 |
1 files changed, 7 insertions, 37 deletions
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<EGLint>(attribs.get(EGL_WIDTH, 0))), mHeight(static_cast<EGLint>(attribs.get(EGL_HEIGHT, 0))), mSwapInterval(1), - mShareHandle(0), - mD3DTexture(nullptr) + mShareHandle(reinterpret_cast<HANDLE *>(shareHandle)) { if (window != nullptr && !mFixedSize) { mWidth = -1; mHeight = -1; } - - switch (buftype) - { - case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE: - mShareHandle = static_cast<HANDLE>(clientBuffer); - break; - - case EGL_D3D_TEXTURE_ANGLE: - mD3DTexture = static_cast<IUnknown *>(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<EGLClientBuffer>(0), - attribs) + : SurfaceD3D(state, renderer, display, config, window, static_cast<EGLClientBuffer>(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<EGLNativeWindowType>(0), - buftype, - clientBuffer, + shareHandle, attribs) { } |