Commit d3a5b185 by Jamie Madill Committed by Commit Bot

Make inheritance heirarchy for egl::Surface.

This will allow us to select the Impl constructor more easily createWindowSurface createPbufferSurface createPbufferSurfaceFromClientBuffer createPixmapSurface This in turn lets us pass an EGLImplFactory to the constructor and will allow us to pass in the local SurfaceState to the constructor. BUG=angleproject:1369 Change-Id: I6b13c1548c54bd5c493d59b68bfdaf55226b6bb5 Reviewed-on: https://chromium-review.googlesource.com/342060Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 61a692b1
...@@ -407,17 +407,8 @@ Error Display::initialize() ...@@ -407,17 +407,8 @@ Error Display::initialize()
if (mDisplayExtensions.deviceQuery) if (mDisplayExtensions.deviceQuery)
{ {
rx::DeviceImpl *impl = nullptr; rx::DeviceImpl *impl = nullptr;
error = mImplementation->getDevice(&impl); ANGLE_TRY(mImplementation->getDevice(&impl));
if (error.isError()) ANGLE_TRY(Device::CreateDevice(this, impl, &mDevice));
{
return error;
}
error = Device::CreateDevice(this, impl, &mDevice);
if (error.isError())
{
return error;
}
} }
else else
{ {
...@@ -539,32 +530,21 @@ Error Display::createWindowSurface(const Config *configuration, EGLNativeWindowT ...@@ -539,32 +530,21 @@ Error Display::createWindowSurface(const Config *configuration, EGLNativeWindowT
{ {
if (mImplementation->testDeviceLost()) if (mImplementation->testDeviceLost())
{ {
Error error = restoreLostDevice(); ANGLE_TRY(restoreLostDevice());
if (error.isError())
{
return error;
}
} }
rx::SurfaceImpl *surfaceImpl = mImplementation->createWindowSurface(configuration, window, attribs); std::unique_ptr<Surface> surface(
ASSERT(surfaceImpl != nullptr); new WindowSurface(mImplementation, configuration, window, attribs));
ANGLE_TRY(surface->initialize());
Error error = surfaceImpl->initialize(); ASSERT(outSurface != nullptr);
if (error.isError()) *outSurface = surface.release();
{ mImplementation->getSurfaceSet().insert(*outSurface);
SafeDelete(surfaceImpl);
return error;
}
Surface *surface = new Surface(surfaceImpl, EGL_WINDOW_BIT, configuration, attribs);
mImplementation->getSurfaceSet().insert(surface);
WindowSurfaceMap *windowSurfaces = GetWindowSurfaces(); WindowSurfaceMap *windowSurfaces = GetWindowSurfaces();
ASSERT(windowSurfaces && windowSurfaces->find(window) == windowSurfaces->end()); ASSERT(windowSurfaces && windowSurfaces->find(window) == windowSurfaces->end());
windowSurfaces->insert(std::make_pair(window, surface)); windowSurfaces->insert(std::make_pair(window, *outSurface));
ASSERT(outSurface != nullptr);
*outSurface = surface;
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
...@@ -574,28 +554,16 @@ Error Display::createPbufferSurface(const Config *configuration, const Attribute ...@@ -574,28 +554,16 @@ Error Display::createPbufferSurface(const Config *configuration, const Attribute
if (mImplementation->testDeviceLost()) if (mImplementation->testDeviceLost())
{ {
Error error = restoreLostDevice(); ANGLE_TRY(restoreLostDevice());
if (error.isError())
{
return error;
}
}
rx::SurfaceImpl *surfaceImpl = mImplementation->createPbufferSurface(configuration, attribs);
ASSERT(surfaceImpl != nullptr);
Error error = surfaceImpl->initialize();
if (error.isError())
{
SafeDelete(surfaceImpl);
return error;
} }
Surface *surface = new Surface(surfaceImpl, EGL_PBUFFER_BIT, configuration, attribs); std::unique_ptr<Surface> surface(new PbufferSurface(mImplementation, configuration, attribs));
mImplementation->getSurfaceSet().insert(surface); ANGLE_TRY(surface->initialize());
ASSERT(outSurface != nullptr); ASSERT(outSurface != nullptr);
*outSurface = surface; *outSurface = surface.release();
mImplementation->getSurfaceSet().insert(*outSurface);
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
...@@ -606,28 +574,17 @@ Error Display::createPbufferFromClientBuffer(const Config *configuration, EGLCli ...@@ -606,28 +574,17 @@ Error Display::createPbufferFromClientBuffer(const Config *configuration, EGLCli
if (mImplementation->testDeviceLost()) if (mImplementation->testDeviceLost())
{ {
Error error = restoreLostDevice(); ANGLE_TRY(restoreLostDevice());
if (error.isError())
{
return error;
}
}
rx::SurfaceImpl *surfaceImpl = mImplementation->createPbufferFromClientBuffer(configuration, shareHandle, attribs);
ASSERT(surfaceImpl != nullptr);
Error error = surfaceImpl->initialize();
if (error.isError())
{
SafeDelete(surfaceImpl);
return error;
} }
Surface *surface = new Surface(surfaceImpl, EGL_PBUFFER_BIT, configuration, attribs); std::unique_ptr<Surface> surface(
mImplementation->getSurfaceSet().insert(surface); new PbufferSurface(mImplementation, configuration, shareHandle, attribs));
ANGLE_TRY(surface->initialize());
ASSERT(outSurface != nullptr); ASSERT(outSurface != nullptr);
*outSurface = surface; *outSurface = surface.release();
mImplementation->getSurfaceSet().insert(*outSurface);
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
...@@ -638,28 +595,17 @@ Error Display::createPixmapSurface(const Config *configuration, NativePixmapType ...@@ -638,28 +595,17 @@ Error Display::createPixmapSurface(const Config *configuration, NativePixmapType
if (mImplementation->testDeviceLost()) if (mImplementation->testDeviceLost())
{ {
Error error = restoreLostDevice(); ANGLE_TRY(restoreLostDevice());
if (error.isError())
{
return error;
}
}
rx::SurfaceImpl *surfaceImpl = mImplementation->createPixmapSurface(configuration, nativePixmap, attribs);
ASSERT(surfaceImpl != nullptr);
Error error = surfaceImpl->initialize();
if (error.isError())
{
SafeDelete(surfaceImpl);
return error;
} }
Surface *surface = new Surface(surfaceImpl, EGL_PIXMAP_BIT, configuration, attribs); std::unique_ptr<Surface> surface(
mImplementation->getSurfaceSet().insert(surface); new PixmapSurface(mImplementation, configuration, nativePixmap, attribs));
ANGLE_TRY(surface->initialize());
ASSERT(outSurface != nullptr); ASSERT(outSurface != nullptr);
*outSurface = surface; *outSurface = surface.release();
mImplementation->getSurfaceSet().insert(*outSurface);
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
...@@ -673,11 +619,7 @@ Error Display::createImage(gl::Context *context, ...@@ -673,11 +619,7 @@ Error Display::createImage(gl::Context *context,
if (mImplementation->testDeviceLost()) if (mImplementation->testDeviceLost())
{ {
Error error = restoreLostDevice(); ANGLE_TRY(restoreLostDevice());
if (error.isError())
{
return error;
}
} }
egl::ImageSibling *sibling = nullptr; egl::ImageSibling *sibling = nullptr;
...@@ -698,11 +640,7 @@ Error Display::createImage(gl::Context *context, ...@@ -698,11 +640,7 @@ Error Display::createImage(gl::Context *context,
rx::ImageImpl *imageImpl = mImplementation->createImage(target, sibling, attribs); rx::ImageImpl *imageImpl = mImplementation->createImage(target, sibling, attribs);
ASSERT(imageImpl != nullptr); ASSERT(imageImpl != nullptr);
Error error = imageImpl->initialize(); ANGLE_TRY(imageImpl->initialize());
if (error.isError())
{
return error;
}
Image *image = new Image(imageImpl, target, sibling, attribs); Image *image = new Image(imageImpl, target, sibling, attribs);
...@@ -753,11 +691,7 @@ Error Display::createContext(const Config *configuration, gl::Context *shareCont ...@@ -753,11 +691,7 @@ Error Display::createContext(const Config *configuration, gl::Context *shareCont
Error Display::makeCurrent(egl::Surface *drawSurface, egl::Surface *readSurface, gl::Context *context) Error Display::makeCurrent(egl::Surface *drawSurface, egl::Surface *readSurface, gl::Context *context)
{ {
Error error = mImplementation->makeCurrent(drawSurface, readSurface, context); ANGLE_TRY(mImplementation->makeCurrent(drawSurface, readSurface, context));
if (error.isError())
{
return error;
}
if (context != nullptr && drawSurface != nullptr) if (context != nullptr && drawSurface != nullptr)
{ {
......
...@@ -10,14 +10,16 @@ ...@@ -10,14 +10,16 @@
#include "libANGLE/Surface.h" #include "libANGLE/Surface.h"
#include "libANGLE/Config.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/Texture.h"
#include <EGL/eglext.h> #include <EGL/eglext.h>
#include <iostream> #include <iostream>
#include "libANGLE/Config.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/Texture.h"
#include "libANGLE/renderer/EGLImplFactory.h"
namespace egl namespace egl
{ {
...@@ -65,9 +67,6 @@ Surface::Surface(rx::SurfaceImpl *impl, ...@@ -65,9 +67,6 @@ Surface::Surface(rx::SurfaceImpl *impl,
} }
mOrientation = static_cast<EGLint>(attributes.get(EGL_SURFACE_ORIENTATION_ANGLE, 0)); mOrientation = static_cast<EGLint>(attributes.get(EGL_SURFACE_ORIENTATION_ANGLE, 0));
mDefaultFramebuffer = createDefaultFramebuffer();
ASSERT(mDefaultFramebuffer != nullptr);
} }
Surface::~Surface() Surface::~Surface()
...@@ -86,6 +85,17 @@ Surface::~Surface() ...@@ -86,6 +85,17 @@ Surface::~Surface()
SafeDelete(mImplementation); SafeDelete(mImplementation);
} }
Error Surface::initialize()
{
ANGLE_TRY(mImplementation->initialize());
// Must happen after implementation initialize for OSX.
mDefaultFramebuffer = createDefaultFramebuffer();
ASSERT(mDefaultFramebuffer != nullptr);
return Error(EGL_SUCCESS);
}
void Surface::setIsCurrent(bool isCurrent) void Surface::setIsCurrent(bool isCurrent)
{ {
if (isCurrent) if (isCurrent)
...@@ -258,4 +268,57 @@ gl::Framebuffer *Surface::createDefaultFramebuffer() ...@@ -258,4 +268,57 @@ gl::Framebuffer *Surface::createDefaultFramebuffer()
return framebuffer; return framebuffer;
} }
WindowSurface::WindowSurface(rx::EGLImplFactory *implFactory,
const egl::Config *config,
EGLNativeWindowType window,
const AttributeMap &attribs)
: Surface(implFactory->createWindowSurface(config, window, attribs),
EGL_WINDOW_BIT,
config,
attribs)
{
}
WindowSurface::~WindowSurface()
{
}
PbufferSurface::PbufferSurface(rx::EGLImplFactory *implFactory,
const Config *config,
const AttributeMap &attribs)
: Surface(implFactory->createPbufferSurface(config, attribs), EGL_PBUFFER_BIT, config, attribs)
{
}
PbufferSurface::PbufferSurface(rx::EGLImplFactory *implFactory,
const Config *config,
EGLClientBuffer shareHandle,
const AttributeMap &attribs)
: Surface(implFactory->createPbufferFromClientBuffer(config, shareHandle, attribs),
EGL_PBUFFER_BIT,
config,
attribs)
{
} }
PbufferSurface::~PbufferSurface()
{
}
PixmapSurface::PixmapSurface(rx::EGLImplFactory *implFactory,
const Config *config,
NativePixmapType nativePixmap,
const AttributeMap &attribs)
: Surface(implFactory->createPixmapSurface(config, nativePixmap, attribs),
EGL_PIXMAP_BIT,
config,
attribs)
{
}
PixmapSurface::~PixmapSurface()
{
}
} // namespace egl
...@@ -25,22 +25,27 @@ class Framebuffer; ...@@ -25,22 +25,27 @@ class Framebuffer;
class Texture; class Texture;
} }
namespace rx
{
class EGLImplFactory;
}
namespace egl namespace egl
{ {
class AttributeMap; class AttributeMap;
class Display; class Display;
struct Config; struct Config;
class Surface final : public gl::FramebufferAttachmentObject class Surface : public gl::FramebufferAttachmentObject
{ {
public: public:
Surface(rx::SurfaceImpl *impl, EGLint surfaceType, const egl::Config *config, const AttributeMap &attributes); virtual ~Surface();
rx::SurfaceImpl *getImplementation() { return mImplementation; } rx::SurfaceImpl *getImplementation() const { return mImplementation; }
const rx::SurfaceImpl *getImplementation() const { return mImplementation; }
EGLint getType() const; EGLint getType() const;
Error initialize();
Error swap(); Error swap();
Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height); Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height);
Error querySurfacePointerANGLE(EGLint attribute, void **value); Error querySurfacePointerANGLE(EGLint attribute, void **value);
...@@ -86,8 +91,11 @@ class Surface final : public gl::FramebufferAttachmentObject ...@@ -86,8 +91,11 @@ class Surface final : public gl::FramebufferAttachmentObject
bool directComposition() const { return mDirectComposition; } bool directComposition() const { return mDirectComposition; }
private: protected:
virtual ~Surface(); Surface(rx::SurfaceImpl *impl,
EGLint surfaceType,
const egl::Config *config,
const AttributeMap &attributes);
rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override { return mImplementation; } rx::FramebufferAttachmentObjectImpl *getAttachmentImpl() const override { return mImplementation; }
gl::Framebuffer *createDefaultFramebuffer(); gl::Framebuffer *createDefaultFramebuffer();
...@@ -126,6 +134,39 @@ class Surface final : public gl::FramebufferAttachmentObject ...@@ -126,6 +134,39 @@ class Surface final : public gl::FramebufferAttachmentObject
BindingPointer<gl::Texture> mTexture; BindingPointer<gl::Texture> mTexture;
}; };
} class WindowSurface final : public Surface
{
public:
WindowSurface(rx::EGLImplFactory *implFactory,
const Config *config,
EGLNativeWindowType window,
const AttributeMap &attribs);
~WindowSurface() override;
};
class PbufferSurface final : public Surface
{
public:
PbufferSurface(rx::EGLImplFactory *implFactory,
const Config *config,
const AttributeMap &attribs);
PbufferSurface(rx::EGLImplFactory *implFactory,
const Config *config,
EGLClientBuffer shareHandle,
const AttributeMap &attribs);
~PbufferSurface() override;
};
class PixmapSurface final : public Surface
{
public:
PixmapSurface(rx::EGLImplFactory *implFactory,
const Config *config,
NativePixmapType nativePixmap,
const AttributeMap &attribs);
~PixmapSurface() override;
};
} // namespace egl
#endif // LIBANGLE_SURFACE_H_ #endif // LIBANGLE_SURFACE_H_
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
#include "libANGLE/Surface.h" #include "libANGLE/Surface.h"
#include "libANGLE/renderer/FramebufferImpl_mock.h" #include "libANGLE/renderer/FramebufferImpl_mock.h"
#include "libANGLE/renderer/SurfaceImpl.h" #include "libANGLE/renderer/SurfaceImpl.h"
#include "tests/angle_unittests_utils.h"
using namespace rx; using namespace rx;
using namespace testing;
namespace namespace
{ {
...@@ -44,16 +46,16 @@ class MockSurfaceImpl : public rx::SurfaceImpl ...@@ -44,16 +46,16 @@ class MockSurfaceImpl : public rx::SurfaceImpl
TEST(SurfaceTest, DestructionDeletesImpl) TEST(SurfaceTest, DestructionDeletesImpl)
{ {
MockFramebufferImpl *framebuffer = new MockFramebufferImpl; NiceMock<MockEGLFactory> factory;
MockSurfaceImpl *impl = new MockSurfaceImpl; MockSurfaceImpl *impl = new MockSurfaceImpl;
EXPECT_CALL(*impl, getSwapBehavior()); EXPECT_CALL(*impl, getSwapBehavior());
EXPECT_CALL(*impl, createDefaultFramebuffer(testing::_)).WillOnce(testing::Return(framebuffer)); EXPECT_CALL(factory, createWindowSurface(_, _, _)).WillOnce(Return(impl));
egl::Config config; egl::Config config;
egl::Surface *surface = new egl::Surface(impl, EGL_WINDOW_BIT, &config, egl::AttributeMap()); egl::Surface *surface = new egl::WindowSurface(
&factory, &config, static_cast<EGLNativeWindowType>(0), egl::AttributeMap());
EXPECT_CALL(*framebuffer, destroy()).Times(1).RetiresOnSaturation();
EXPECT_CALL(*impl, destroy()).Times(1).RetiresOnSaturation(); EXPECT_CALL(*impl, destroy()).Times(1).RetiresOnSaturation();
surface->onDestroy(); surface->onDestroy();
...@@ -61,7 +63,7 @@ TEST(SurfaceTest, DestructionDeletesImpl) ...@@ -61,7 +63,7 @@ TEST(SurfaceTest, DestructionDeletesImpl)
// Only needed because the mock is leaked if bugs are present, // Only needed because the mock is leaked if bugs are present,
// which logs an error, but does not cause the test to fail. // which logs an error, but does not cause the test to fail.
// Ordinarily mocks are verified when destroyed. // Ordinarily mocks are verified when destroyed.
testing::Mock::VerifyAndClear(impl); Mock::VerifyAndClear(impl);
} }
} // namespace } // namespace
...@@ -168,14 +168,14 @@ SurfaceImpl *DisplayD3D::createWindowSurface(const egl::Config *configuration, ...@@ -168,14 +168,14 @@ SurfaceImpl *DisplayD3D::createWindowSurface(const egl::Config *configuration,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
ASSERT(mRenderer != nullptr); ASSERT(mRenderer != nullptr);
return SurfaceD3D::createFromWindow(mRenderer, mDisplay, configuration, window, attribs); return new WindowSurfaceD3D(mRenderer, mDisplay, configuration, window, attribs);
} }
SurfaceImpl *DisplayD3D::createPbufferSurface(const egl::Config *configuration, SurfaceImpl *DisplayD3D::createPbufferSurface(const egl::Config *configuration,
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
ASSERT(mRenderer != nullptr); ASSERT(mRenderer != nullptr);
return SurfaceD3D::createOffscreen(mRenderer, mDisplay, configuration, nullptr, attribs); return new PbufferSurfaceD3D(mRenderer, mDisplay, configuration, nullptr, attribs);
} }
SurfaceImpl *DisplayD3D::createPbufferFromClientBuffer(const egl::Config *configuration, SurfaceImpl *DisplayD3D::createPbufferFromClientBuffer(const egl::Config *configuration,
...@@ -183,7 +183,7 @@ SurfaceImpl *DisplayD3D::createPbufferFromClientBuffer(const egl::Config *config ...@@ -183,7 +183,7 @@ SurfaceImpl *DisplayD3D::createPbufferFromClientBuffer(const egl::Config *config
const egl::AttributeMap &attribs) const egl::AttributeMap &attribs)
{ {
ASSERT(mRenderer != nullptr); ASSERT(mRenderer != nullptr);
return SurfaceD3D::createOffscreen(mRenderer, mDisplay, configuration, shareHandle, attribs); return new PbufferSurfaceD3D(mRenderer, mDisplay, configuration, shareHandle, attribs);
} }
SurfaceImpl *DisplayD3D::createPixmapSurface(const egl::Config *configuration, SurfaceImpl *DisplayD3D::createPixmapSurface(const egl::Config *configuration,
......
...@@ -21,26 +21,6 @@ ...@@ -21,26 +21,6 @@
namespace rx namespace rx
{ {
SurfaceD3D *SurfaceD3D::createFromWindow(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLNativeWindowType window,
const egl::AttributeMap &attribs)
{
return new SurfaceD3D(renderer, display, config, window, static_cast<EGLClientBuffer>(0),
attribs);
}
SurfaceD3D *SurfaceD3D::createOffscreen(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs)
{
return new SurfaceD3D(renderer, display, config, static_cast<EGLNativeWindowType>(0),
shareHandle, attribs);
}
SurfaceD3D::SurfaceD3D(RendererD3D *renderer, SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
egl::Display *display, egl::Display *display,
const egl::Config *config, const egl::Config *config,
...@@ -354,4 +334,35 @@ gl::Error SurfaceD3D::getAttachmentRenderTarget(const gl::FramebufferAttachment: ...@@ -354,4 +334,35 @@ gl::Error SurfaceD3D::getAttachmentRenderTarget(const gl::FramebufferAttachment:
return gl::Error(GL_NO_ERROR); return gl::Error(GL_NO_ERROR);
} }
WindowSurfaceD3D::WindowSurfaceD3D(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLNativeWindowType window,
const egl::AttributeMap &attribs)
: SurfaceD3D(renderer, display, config, window, static_cast<EGLClientBuffer>(0), attribs)
{
} }
WindowSurfaceD3D::~WindowSurfaceD3D()
{
}
PbufferSurfaceD3D::PbufferSurfaceD3D(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs)
: SurfaceD3D(renderer,
display,
config,
static_cast<EGLNativeWindowType>(0),
shareHandle,
attribs)
{
}
PbufferSurfaceD3D::~PbufferSurfaceD3D()
{
}
} // namespace rc
...@@ -25,16 +25,6 @@ class RendererD3D; ...@@ -25,16 +25,6 @@ class RendererD3D;
class SurfaceD3D : public SurfaceImpl class SurfaceD3D : public SurfaceImpl
{ {
public: public:
static SurfaceD3D *createFromWindow(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLNativeWindowType window,
const egl::AttributeMap &attribs);
static SurfaceD3D *createOffscreen(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs);
~SurfaceD3D() override; ~SurfaceD3D() override;
void releaseSwapChain(); void releaseSwapChain();
...@@ -65,7 +55,7 @@ class SurfaceD3D : public SurfaceImpl ...@@ -65,7 +55,7 @@ class SurfaceD3D : public SurfaceImpl
gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
FramebufferAttachmentRenderTarget **rtOut) override; FramebufferAttachmentRenderTarget **rtOut) override;
private: protected:
SurfaceD3D(RendererD3D *renderer, SurfaceD3D(RendererD3D *renderer,
egl::Display *display, egl::Display *display,
const egl::Config *config, const egl::Config *config,
...@@ -98,7 +88,28 @@ class SurfaceD3D : public SurfaceImpl ...@@ -98,7 +88,28 @@ class SurfaceD3D : public SurfaceImpl
HANDLE mShareHandle; HANDLE mShareHandle;
}; };
class WindowSurfaceD3D : public SurfaceD3D
{
public:
WindowSurfaceD3D(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLNativeWindowType window,
const egl::AttributeMap &attribs);
~WindowSurfaceD3D() override;
};
} class PbufferSurfaceD3D : public SurfaceD3D
{
public:
PbufferSurfaceD3D(RendererD3D *renderer,
egl::Display *display,
const egl::Config *config,
EGLClientBuffer shareHandle,
const egl::AttributeMap &attribs);
~PbufferSurfaceD3D() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_D3D_SURFACED3D_H_ #endif // LIBANGLE_RENDERER_D3D_SURFACED3D_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment