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 |
| 15 public: |
| 16 static WebGLTimerQueryEXT* create(WebGLRenderingContextBase*); |
| 17 ~WebGLTimerQueryEXT() override; |
| 18 |
| 19 void setTarget(GLenum target) { m_target = target; } |
| 20 |
| 21 GLuint object() const { return m_queryId; } |
| 22 bool hasTarget() const { return m_target != 0; } |
| 23 GLenum target() const { return m_target; } |
| 24 |
| 25 protected: |
| 26 WebGLTimerQueryEXT(WebGLRenderingContextBase*); |
| 27 |
| 28 private: |
| 29 bool hasObject() const override { return m_queryId != 0; } |
| 30 void deleteObjectImpl(WebGraphicsContext3D*) override; |
| 31 |
| 32 GLenum m_target; |
| 33 GLuint m_queryId; |
| 34 }; |
| 35 |
| 36 } // namespace blink |
| 37 |
| 38 #endif // WebGLTimerQueryEXT_h |
OLD | NEW |