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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.h

Issue 1817323003: Revert of Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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
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 GLuint object() const { return m_object; } 67 Platform3DObject object() const { return m_object; }
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
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 GLuint m_object; 117 Platform3DObject 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698