Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / dom / canvas / WebGLFramebufferAttachable.h
blob552577e69db961bc258daa1f1064589361a952fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef WEBGLFRAMEBUFFERATTACHABLE_H_
7 #define WEBGLFRAMEBUFFERATTACHABLE_H_
9 #include "GLDefs.h"
10 #include "nsTArray.h"
11 #include "mozilla/WeakPtr.h"
12 #include "WebGLFramebuffer.h"
14 namespace mozilla {
16 class WebGLFramebufferAttachable
18 struct AttachmentPoint
20 AttachmentPoint(const WebGLFramebuffer* fb, GLenum attachment)
21 : mFB(fb)
22 , mAttachment(attachment)
25 WeakPtr<const WebGLFramebuffer> mFB;
26 GLenum mAttachment;
28 bool operator==(const AttachmentPoint& o) const {
29 return mFB == o.mFB && mAttachment == o.mAttachment;
33 nsTArray<AttachmentPoint> mAttachmentPoints;
35 public:
37 // Track FBO/Attachment combinations
38 void AttachTo(WebGLFramebuffer* fb, GLenum attachment);
39 void DetachFrom(WebGLFramebuffer* fb, GLenum attachment);
40 void NotifyFBsStatusChanged();
43 } // namespace mozilla
45 #endif // !WEBGLFRAMEBUFFERATTACHABLE_H_