| Index: third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
|
| index 85e92d589e9faf9861cc96cc87cbb486281b8cd0..0dc91b20b05dd79913f6b4f0943d86fa523fbcb0 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
|
| @@ -5,42 +5,75 @@
|
| #ifndef WebGLTransformFeedback_h
|
| #define WebGLTransformFeedback_h
|
|
|
| +#include "modules/webgl/WebGLContextObject.h"
|
| #include "modules/webgl/WebGLProgram.h"
|
| -#include "modules/webgl/WebGLSharedPlatform3DObject.h"
|
| #include "platform/wtf/PassRefPtr.h"
|
|
|
| namespace blink {
|
|
|
| class WebGL2RenderingContextBase;
|
| +class WebGLBuffer;
|
|
|
| -class WebGLTransformFeedback : public WebGLSharedPlatform3DObject {
|
| +class WebGLTransformFeedback : public WebGLContextObject {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| + enum TFType {
|
| + TFTypeDefault,
|
| + TFTypeUser,
|
| + };
|
| +
|
| ~WebGLTransformFeedback() override;
|
|
|
| - static WebGLTransformFeedback* Create(WebGL2RenderingContextBase*);
|
| + GLuint Object() const { return object_; }
|
| +
|
| + static WebGLTransformFeedback* Create(WebGL2RenderingContextBase*, TFType);
|
| +
|
| + bool IsDefaultObject() const { return type_ == TFTypeDefault; }
|
|
|
| GLenum GetTarget() const { return target_; }
|
| void SetTarget(GLenum);
|
|
|
| - bool HasEverBeenBound() const { return Object() && target_; }
|
| + bool HasEverBeenBound() const { return object_ && target_; }
|
|
|
| WebGLProgram* GetProgram() const { return program_; }
|
| void SetProgram(WebGLProgram*);
|
|
|
| - DECLARE_TRACE();
|
| + // This is the generic bind point for the transform feedback buffer.
|
| + void SetBoundTransformFeedbackBuffer(WebGLBuffer*);
|
| + WebGLBuffer* GetBoundTransformFeedbackBuffer() const;
|
| +
|
| + // These are the indexed bind points for transform feedback buffers.
|
| + // Returns false if index is out of range and the caller should
|
| + // synthesize a GL error.
|
| + bool SetBoundIndexedTransformFeedbackBuffer(GLuint index, WebGLBuffer*);
|
| + bool GetBoundIndexedTransformFeedbackBuffer(GLuint index,
|
| + WebGLBuffer** outBuffer) const;
|
| +
|
| + bool IsBufferBoundToTransformFeedback(WebGLBuffer*);
|
| +
|
| + void UnbindBuffer(WebGLBuffer*);
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| + DECLARE_VIRTUAL_TRACE_WRAPPERS();
|
|
|
| protected:
|
| - explicit WebGLTransformFeedback(WebGL2RenderingContextBase*);
|
| + explicit WebGLTransformFeedback(WebGL2RenderingContextBase*, TFType);
|
|
|
| + private:
|
| + void DispatchDetached(gpu::gles2::GLES2Interface*);
|
| + bool HasObject() const override { return object_ != 0; }
|
| void DeleteObjectImpl(gpu::gles2::GLES2Interface*) override;
|
|
|
| - private:
|
| - bool IsTransformFeedback() const override { return true; }
|
| + GLuint object_;
|
|
|
| + TFType type_;
|
| GLenum target_;
|
|
|
| + TraceWrapperMember<WebGLBuffer> bound_transform_feedback_buffer_;
|
| + HeapVector<TraceWrapperMember<WebGLBuffer>>
|
| + bound_indexed_transform_feedback_buffers_;
|
| +
|
| Member<WebGLProgram> program_;
|
| };
|
|
|
|
|