OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebGLTimerQueryEXT_h |
| 6 #define WebGLTimerQueryEXT_h |
| 7 |
| 8 #include "modules/webgl/WebGLContextObject.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class WebGLTimerQueryEXT : public WebGLContextObject { |
| 13 DEFINE_WRAPPERTYPEINFO(); |
| 14 public: |
| 15 static WebGLTimerQueryEXT* create(WebGLRenderingContextBase*); |
| 16 ~WebGLTimerQueryEXT() override; |
| 17 |
| 18 void setTarget(GLenum target) { m_target = target; } |
| 19 |
| 20 GLuint object() const { return m_queryId; } |
| 21 bool hasTarget() const { return m_target != 0; } |
| 22 GLenum target() const { return m_target; } |
| 23 |
| 24 protected: |
| 25 WebGLTimerQueryEXT(WebGLRenderingContextBase*); |
| 26 |
| 27 private: |
| 28 bool hasObject() const override { return m_queryId != 0; } |
| 29 void deleteObjectImpl(WebGraphicsContext3D*) override; |
| 30 |
| 31 GLenum m_target; |
| 32 GLuint m_queryId; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // WebGLTimerQueryEXT_h |
OLD | NEW |