| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   43 class WebGLFramebuffer final : public WebGLContextObject { |   43 class WebGLFramebuffer final : public WebGLContextObject { | 
|   44     DEFINE_WRAPPERTYPEINFO(); |   44     DEFINE_WRAPPERTYPEINFO(); | 
|   45 public: |   45 public: | 
|   46     class WebGLAttachment : public GarbageCollectedFinalized<WebGLAttachment> { |   46     class WebGLAttachment : public GarbageCollectedFinalized<WebGLAttachment> { | 
|   47     public: |   47     public: | 
|   48         virtual ~WebGLAttachment(); |   48         virtual ~WebGLAttachment(); | 
|   49  |   49  | 
|   50         virtual WebGLSharedObject* object() const = 0; |   50         virtual WebGLSharedObject* object() const = 0; | 
|   51         virtual bool isSharedObject(WebGLSharedObject*) const = 0; |   51         virtual bool isSharedObject(WebGLSharedObject*) const = 0; | 
|   52         virtual bool valid() const = 0; |   52         virtual bool valid() const = 0; | 
|   53         virtual void onDetached(WebGraphicsContext3D*) = 0; |   53         virtual void onDetached(WebGraphicsContext3D*, gpu::gles2::GLES2Interfac
     e*) = 0; | 
|   54         virtual void attach(gpu::gles2::GLES2Interface*, GLenum target, GLenum a
     ttachment) = 0; |   54         virtual void attach(gpu::gles2::GLES2Interface*, GLenum target, GLenum a
     ttachment) = 0; | 
|   55         virtual void unattach(gpu::gles2::GLES2Interface*, GLenum target, GLenum
      attachment) = 0; |   55         virtual void unattach(gpu::gles2::GLES2Interface*, GLenum target, GLenum
      attachment) = 0; | 
|   56  |   56  | 
|   57         DEFINE_INLINE_VIRTUAL_TRACE() { } |   57         DEFINE_INLINE_VIRTUAL_TRACE() { } | 
|   58  |   58  | 
|   59     protected: |   59     protected: | 
|   60         WebGLAttachment(); |   60         WebGLAttachment(); | 
|   61     }; |   61     }; | 
|   62  |   62  | 
|   63     ~WebGLFramebuffer() override; |   63     ~WebGLFramebuffer() override; | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
|   93     void readBuffer(const GLenum colorBuffer) { m_readBuffer = colorBuffer; } |   93     void readBuffer(const GLenum colorBuffer) { m_readBuffer = colorBuffer; } | 
|   94  |   94  | 
|   95     GLenum getReadBuffer() const { return m_readBuffer; } |   95     GLenum getReadBuffer() const { return m_readBuffer; } | 
|   96  |   96  | 
|   97     DECLARE_VIRTUAL_TRACE(); |   97     DECLARE_VIRTUAL_TRACE(); | 
|   98  |   98  | 
|   99 protected: |   99 protected: | 
|  100     explicit WebGLFramebuffer(WebGLRenderingContextBase*); |  100     explicit WebGLFramebuffer(WebGLRenderingContextBase*); | 
|  101  |  101  | 
|  102     bool hasObject() const override { return m_object != 0; } |  102     bool hasObject() const override { return m_object != 0; } | 
|  103     void deleteObjectImpl(WebGraphicsContext3D*) override; |  103     void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov
     erride; | 
|  104  |  104  | 
|  105 private: |  105 private: | 
|  106     WebGLAttachment* getAttachment(GLenum attachment) const; |  106     WebGLAttachment* getAttachment(GLenum attachment) const; | 
|  107  |  107  | 
|  108     // Check if the framebuffer is currently bound. |  108     // Check if the framebuffer is currently bound. | 
|  109     bool isBound(GLenum target) const; |  109     bool isBound(GLenum target) const; | 
|  110  |  110  | 
|  111     // attach 'attachment' at 'attachmentPoint'. |  111     // attach 'attachment' at 'attachmentPoint'. | 
|  112     void attach(GLenum target, GLenum attachment, GLenum attachmentPoint); |  112     void attach(GLenum target, GLenum attachment, GLenum attachmentPoint); | 
|  113  |  113  | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  125  |  125  | 
|  126     Vector<GLenum> m_drawBuffers; |  126     Vector<GLenum> m_drawBuffers; | 
|  127     Vector<GLenum> m_filteredDrawBuffers; |  127     Vector<GLenum> m_filteredDrawBuffers; | 
|  128  |  128  | 
|  129     GLenum m_readBuffer; |  129     GLenum m_readBuffer; | 
|  130 }; |  130 }; | 
|  131  |  131  | 
|  132 } // namespace blink |  132 } // namespace blink | 
|  133  |  133  | 
|  134 #endif // WebGLFramebuffer_h |  134 #endif // WebGLFramebuffer_h | 
| OLD | NEW |