| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebGLTransformFeedback_h | 5 #ifndef WebGLTransformFeedback_h |
| 6 #define WebGLTransformFeedback_h | 6 #define WebGLTransformFeedback_h |
| 7 | 7 |
| 8 #include "modules/webgl/WebGLProgram.h" | 8 #include "modules/webgl/WebGLProgram.h" |
| 9 #include "modules/webgl/WebGLSharedPlatform3DObject.h" | 9 #include "modules/webgl/WebGLSharedPlatform3DObject.h" |
| 10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class WebGL2RenderingContextBase; | 14 class WebGL2RenderingContextBase; |
| 15 | 15 |
| 16 class WebGLTransformFeedback : public WebGLSharedPlatform3DObject { | 16 class WebGLTransformFeedback : public WebGLSharedPlatform3DObject { |
| 17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 public: | 18 public: |
| 19 ~WebGLTransformFeedback() override; | 19 ~WebGLTransformFeedback() override; |
| 20 | 20 |
| 21 static WebGLTransformFeedback* create(WebGL2RenderingContextBase*); | 21 static WebGLTransformFeedback* create(WebGL2RenderingContextBase*); |
| 22 | 22 |
| 23 GLenum getTarget() const { return m_target; } | 23 GLenum getTarget() const { return m_target; } |
| 24 void setTarget(GLenum); | 24 void setTarget(GLenum); |
| 25 | 25 |
| 26 bool hasEverBeenBound() const { return object() && m_target; } | 26 bool hasEverBeenBound() const { return object() && m_target; } |
| 27 | 27 |
| 28 bool isActive() const { return m_active; } | |
| 29 bool isPaused() const { return m_paused; } | |
| 30 void setActive(bool); | |
| 31 void setPaused(bool); | |
| 32 | |
| 33 WebGLProgram* getProgram() const { return m_program; } | 28 WebGLProgram* getProgram() const { return m_program; } |
| 34 void setProgram(WebGLProgram*); | 29 void setProgram(WebGLProgram*); |
| 35 | 30 |
| 36 DECLARE_TRACE(); | 31 DECLARE_TRACE(); |
| 37 | 32 |
| 38 protected: | 33 protected: |
| 39 explicit WebGLTransformFeedback(WebGL2RenderingContextBase*); | 34 explicit WebGLTransformFeedback(WebGL2RenderingContextBase*); |
| 40 | 35 |
| 41 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; | 36 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; |
| 42 | 37 |
| 43 private: | 38 private: |
| 44 bool isTransformFeedback() const override { return true; } | 39 bool isTransformFeedback() const override { return true; } |
| 45 | 40 |
| 46 GLenum m_target; | 41 GLenum m_target; |
| 47 | 42 |
| 48 bool m_active; | |
| 49 bool m_paused; | |
| 50 | |
| 51 Member<WebGLProgram> m_program; | 43 Member<WebGLProgram> m_program; |
| 52 }; | 44 }; |
| 53 | 45 |
| 54 } // namespace blink | 46 } // namespace blink |
| 55 | 47 |
| 56 #endif // WebGLTransformFeedback_h | 48 #endif // WebGLTransformFeedback_h |
| OLD | NEW |