1 // 2 // Copyright 2015 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 // EGLImageD3D.h: Defines the rx::EGLImageD3D class, the D3D implementation of EGL images 8 9 #ifndef LIBANGLE_RENDERER_D3D_EGLIMAGED3D_H_ 10 #define LIBANGLE_RENDERER_D3D_EGLIMAGED3D_H_ 11 12 #include "libANGLE/renderer/ImageImpl.h" 13 14 namespace gl 15 { 16 class Context; 17 } 18 19 namespace egl 20 { 21 class AttributeMap; 22 } 23 24 namespace rx 25 { 26 class FramebufferAttachmentObjectImpl; 27 class TextureD3D; 28 class RenderbufferD3D; 29 class RendererD3D; 30 class RenderTargetD3D; 31 32 class EGLImageD3D final : public ImageImpl 33 { 34 public: 35 EGLImageD3D(const egl::ImageState &state, 36 EGLenum target, 37 const egl::AttributeMap &attribs, 38 RendererD3D *renderer); 39 ~EGLImageD3D() override; 40 41 egl::Error initialize(const egl::Display *display) override; 42 43 angle::Result orphan(const gl::Context *context, egl::ImageSibling *sibling) override; 44 45 angle::Result getRenderTarget(const gl::Context *context, RenderTargetD3D **outRT) const; 46 47 private: 48 angle::Result copyToLocalRendertarget(const gl::Context *context); 49 50 RendererD3D *mRenderer; 51 RenderTargetD3D *mRenderTarget; 52 }; 53 } // namespace rx 54 55 #endif // LIBANGLE_RENDERER_D3D_EGLIMAGED3D_H_ 56