Chromium Code Reviews| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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; |
| 64 | 64 |
| 65 static WebGLFramebuffer* create(WebGLRenderingContextBase*); | 65 static WebGLFramebuffer* create(WebGLRenderingContextBase*); |
| 66 | 66 |
| 67 Platform3DObject object() const { return m_object; } | 67 uint32_t object() const { return m_object; } |
|
Ken Russell (switch to Gerrit)
2016/03/19 01:46:39
Here and for m_object it would be semantically hel
danakj
2016/03/21 22:27:02
Done.
| |
| 68 | 68 |
| 69 void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, GLen um texTarget, WebGLTexture*, GLint level, GLint layer); | 69 void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, GLen um texTarget, WebGLTexture*, GLint level, GLint layer); |
| 70 void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, WebG LRenderbuffer*); | 70 void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, WebG LRenderbuffer*); |
| 71 // If an object is attached to the currently bound framebuffer, remove it. | 71 // If an object is attached to the currently bound framebuffer, remove it. |
| 72 void removeAttachmentFromBoundFramebuffer(GLenum target, WebGLSharedObject*) ; | 72 void removeAttachmentFromBoundFramebuffer(GLenum target, WebGLSharedObject*) ; |
| 73 // If a given attachment point for the currently bound framebuffer is not nu ll, remove the attached object. | 73 // If a given attachment point for the currently bound framebuffer is not nu ll, remove the attached object. |
| 74 void removeAttachmentFromBoundFramebuffer(GLenum target, GLenum attachment); | 74 void removeAttachmentFromBoundFramebuffer(GLenum target, GLenum attachment); |
| 75 WebGLSharedObject* getAttachmentObject(GLenum) const; | 75 WebGLSharedObject* getAttachmentObject(GLenum) const; |
| 76 | 76 |
| 77 // WebGL 1 specific: | 77 // WebGL 1 specific: |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 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 |
| 114 // Check if a new drawBuffers call should be issued. This is called when we add or remove an attachment. | 114 // Check if a new drawBuffers call should be issued. This is called when we add or remove an attachment. |
| 115 void drawBuffersIfNecessary(bool force); | 115 void drawBuffersIfNecessary(bool force); |
| 116 | 116 |
| 117 Platform3DObject m_object; | 117 uint32_t m_object; |
| 118 | 118 |
| 119 typedef HeapHashMap<GLenum, Member<WebGLAttachment>> AttachmentMap; | 119 typedef HeapHashMap<GLenum, Member<WebGLAttachment>> AttachmentMap; |
| 120 | 120 |
| 121 AttachmentMap m_attachments; | 121 AttachmentMap m_attachments; |
| 122 bool m_destructionInProgress; | 122 bool m_destructionInProgress; |
| 123 | 123 |
| 124 bool m_hasEverBeenBound; | 124 bool m_hasEverBeenBound; |
| 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 |