| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WebGLFramebuffer_h | 26 #ifndef WebGLFramebuffer_h |
| 27 #define WebGLFramebuffer_h | 27 #define WebGLFramebuffer_h |
| 28 | 28 |
| 29 #include "modules/webgl/WebGLContextObject.h" | 29 #include "modules/webgl/WebGLContextObject.h" |
| 30 #include "modules/webgl/WebGLSharedObject.h" | 30 #include "modules/webgl/WebGLSharedObject.h" |
| 31 | 31 |
| 32 namespace gpu { |
| 33 namespace gles2 { |
| 34 class GLES2Interface; |
| 35 } |
| 36 } |
| 37 |
| 32 namespace blink { | 38 namespace blink { |
| 33 | 39 |
| 34 class WebGLRenderbuffer; | 40 class WebGLRenderbuffer; |
| 35 class WebGLTexture; | 41 class WebGLTexture; |
| 36 | 42 |
| 37 class WebGLFramebuffer final : public WebGLContextObject { | 43 class WebGLFramebuffer final : public WebGLContextObject { |
| 38 DEFINE_WRAPPERTYPEINFO(); | 44 DEFINE_WRAPPERTYPEINFO(); |
| 39 public: | 45 public: |
| 40 class WebGLAttachment : public GarbageCollectedFinalized<WebGLAttachment> { | 46 class WebGLAttachment : public GarbageCollectedFinalized<WebGLAttachment> { |
| 41 public: | 47 public: |
| 42 virtual ~WebGLAttachment(); | 48 virtual ~WebGLAttachment(); |
| 43 | 49 |
| 44 virtual WebGLSharedObject* object() const = 0; | 50 virtual WebGLSharedObject* object() const = 0; |
| 45 virtual bool isSharedObject(WebGLSharedObject*) const = 0; | 51 virtual bool isSharedObject(WebGLSharedObject*) const = 0; |
| 46 virtual bool valid() const = 0; | 52 virtual bool valid() const = 0; |
| 47 virtual void onDetached(WebGraphicsContext3D*) = 0; | 53 virtual void onDetached(WebGraphicsContext3D*) = 0; |
| 48 virtual void attach(WebGraphicsContext3D*, GLenum target, GLenum attachm
ent) = 0; | 54 virtual void attach(gpu::gles2::GLES2Interface*, GLenum target, GLenum a
ttachment) = 0; |
| 49 virtual void unattach(WebGraphicsContext3D*, GLenum target, GLenum attac
hment) = 0; | 55 virtual void unattach(gpu::gles2::GLES2Interface*, GLenum target, GLenum
attachment) = 0; |
| 50 | 56 |
| 51 DEFINE_INLINE_VIRTUAL_TRACE() { } | 57 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 52 | 58 |
| 53 protected: | 59 protected: |
| 54 WebGLAttachment(); | 60 WebGLAttachment(); |
| 55 }; | 61 }; |
| 56 | 62 |
| 57 ~WebGLFramebuffer() override; | 63 ~WebGLFramebuffer() override; |
| 58 | 64 |
| 59 static WebGLFramebuffer* create(WebGLRenderingContextBase*); | 65 static WebGLFramebuffer* create(WebGLRenderingContextBase*); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 125 |
| 120 Vector<GLenum> m_drawBuffers; | 126 Vector<GLenum> m_drawBuffers; |
| 121 Vector<GLenum> m_filteredDrawBuffers; | 127 Vector<GLenum> m_filteredDrawBuffers; |
| 122 | 128 |
| 123 GLenum m_readBuffer; | 129 GLenum m_readBuffer; |
| 124 }; | 130 }; |
| 125 | 131 |
| 126 } // namespace blink | 132 } // namespace blink |
| 127 | 133 |
| 128 #endif // WebGLFramebuffer_h | 134 #endif // WebGLFramebuffer_h |
| OLD | NEW |