Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1086)

Unified Diff: Source/core/html/canvas/WebGLFramebuffer.h

Issue 1120953002: WebGL 2: add read/write framebuffer binding points to related APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed kbr@'s feedback Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/WebGLFramebuffer.h
diff --git a/Source/core/html/canvas/WebGLFramebuffer.h b/Source/core/html/canvas/WebGLFramebuffer.h
index f15ae11db68379276210d8d5091a95b5b065b57c..05c47ed9e5b2b1f6980881836c64037ee14f6738 100644
--- a/Source/core/html/canvas/WebGLFramebuffer.h
+++ b/Source/core/html/canvas/WebGLFramebuffer.h
@@ -55,8 +55,8 @@ public:
virtual bool isSharedObject(WebGLSharedObject*) const = 0;
virtual bool valid() const = 0;
virtual void onDetached(WebGraphicsContext3D*) = 0;
- virtual void attach(WebGraphicsContext3D*, GLenum attachment) = 0;
- virtual void unattach(WebGraphicsContext3D*, GLenum attachment) = 0;
+ virtual void attach(WebGraphicsContext3D*, GLenum target, GLenum attachment) = 0;
+ virtual void unattach(WebGraphicsContext3D*, GLenum target, GLenum attachment) = 0;
DEFINE_INLINE_VIRTUAL_TRACE() { }
@@ -70,12 +70,12 @@ public:
Platform3DObject object() const { return m_object; }
- void setAttachmentForBoundFramebuffer(GLenum attachment, GLenum texTarget, WebGLTexture*, GLint level);
- void setAttachmentForBoundFramebuffer(GLenum attachment, WebGLRenderbuffer*);
+ void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, GLenum texTarget, WebGLTexture*, GLint level);
+ void setAttachmentForBoundFramebuffer(GLenum target, GLenum attachment, WebGLRenderbuffer*);
// If an object is attached to the currently bound framebuffer, remove it.
- void removeAttachmentFromBoundFramebuffer(WebGLSharedObject*);
+ void removeAttachmentFromBoundFramebuffer(GLenum target, WebGLSharedObject*);
// If a given attachment point for the currently bound framebuffer is not null, remove the attached object.
- void removeAttachmentFromBoundFramebuffer(GLenum);
+ void removeAttachmentFromBoundFramebuffer(GLenum target, GLenum attachment);
WebGLSharedObject* getAttachmentObject(GLenum) const;
GLenum colorBufferFormat() const;
@@ -84,13 +84,13 @@ public:
// readPixels, copyTexImage2D, copyTexSubImage2D if this framebuffer is
// currently bound.
// Return false if the framebuffer is incomplete.
- bool onAccess(WebGraphicsContext3D*, const char** reason);
+ bool onAccess(WebGraphicsContext3D*, GLenum target, const char** reason);
// Software version of glCheckFramebufferStatus(), except that when
// FRAMEBUFFER_COMPLETE is returned, it is still possible for
// glCheckFramebufferStatus() to return FRAMEBUFFER_UNSUPPORTED,
// depending on hardware implementation.
- GLenum checkStatus(const char** reason) const;
+ GLenum checkStatus(const char** reason, GLenum target) const;
bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; }
@@ -112,14 +112,14 @@ protected:
void deleteObjectImpl(WebGraphicsContext3D*) override;
private:
- WebGLAttachment* getAttachment(GLenum) const;
+ WebGLAttachment* getAttachment(GLenum target, GLenum attachment) const;
bool isAttachmentComplete(WebGLAttachment* attachedObject, GLenum attachment, const char** reason) const;
// Check if the framebuffer is currently bound.
bool isBound() const;
// attach 'attachment' at 'attachmentPoint'.
- void attach(GLenum attachment, GLenum attachmentPoint);
+ void attach(GLenum target, GLenum attachment, GLenum attachmentPoint);
// Check if a new drawBuffers call should be issued. This is called when we add or remove an attachment.
void drawBuffersIfNecessary(bool force);

Powered by Google App Engine
This is Rietveld 408576698