mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1167504 - Part 5: Remove BindableName - Transform Feedback. r=jgilbert
This commit is contained in:
parent
e1b36d0a84
commit
3922303a14
@ -60,7 +60,7 @@ WebGL2Context::IsTransformFeedback(WebGLTransformFeedback* tf)
|
||||
return false;
|
||||
|
||||
MakeContextCurrent();
|
||||
return gl->fIsTransformFeedback(tf->GLName());
|
||||
return gl->fIsTransformFeedback(tf->mGLName);
|
||||
}
|
||||
|
||||
void
|
||||
@ -84,11 +84,8 @@ WebGL2Context::BindTransformFeedback(GLenum target, WebGLTransformFeedback* tf)
|
||||
if (tf && tf->IsDeleted())
|
||||
return ErrorInvalidOperation("bindTransformFeedback: Attempt to bind deleted id");
|
||||
|
||||
if (tf)
|
||||
tf->BindTo(LOCAL_GL_TRANSFORM_FEEDBACK);
|
||||
|
||||
MakeContextCurrent();
|
||||
gl->fBindTransformFeedback(target, tf ? tf->GLName() : 0);
|
||||
gl->fBindTransformFeedback(target, tf ? tf->mGLName : 0);
|
||||
if (tf)
|
||||
mBoundTransformFeedback = tf;
|
||||
else
|
||||
|
@ -13,8 +13,8 @@ namespace mozilla {
|
||||
|
||||
WebGLTransformFeedback::WebGLTransformFeedback(WebGLContext* webgl,
|
||||
GLuint tf)
|
||||
: WebGLBindableName<GLenum>(tf)
|
||||
, WebGLContextBoundObject(webgl)
|
||||
: WebGLContextBoundObject(webgl)
|
||||
, mGLName(tf)
|
||||
, mMode(LOCAL_GL_NONE)
|
||||
, mIsActive(false)
|
||||
, mIsPaused(false)
|
||||
|
@ -8,14 +8,12 @@
|
||||
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "WebGLBindableName.h"
|
||||
#include "WebGLObjectModel.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLTransformFeedback final
|
||||
: public nsWrapperCache
|
||||
, public WebGLBindableName<GLenum>
|
||||
, public WebGLRefCountedObject<WebGLTransformFeedback>
|
||||
, public LinkedListElement<WebGLTransformFeedback>
|
||||
, public WebGLContextBoundObject
|
||||
@ -30,11 +28,14 @@ public:
|
||||
WebGLContext* GetParentObject() const;
|
||||
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
const GLuint mGLName;
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLTransformFeedback)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLTransformFeedback)
|
||||
|
||||
private:
|
||||
~WebGLTransformFeedback();
|
||||
|
||||
GLenum mMode;
|
||||
bool mIsActive;
|
||||
bool mIsPaused;
|
||||
|
Loading…
Reference in New Issue
Block a user