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 #include "config.h" |
| 6 |
| 7 #include "modules/webgl/WebGLTimerQueryEXT.h" |
| 8 |
| 9 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 WebGLTimerQueryEXT* WebGLTimerQueryEXT::create(WebGLRenderingContextBase* ctx) |
| 14 { |
| 15 return new WebGLTimerQueryEXT(ctx); |
| 16 } |
| 17 |
| 18 WebGLTimerQueryEXT::~WebGLTimerQueryEXT() |
| 19 { |
| 20 // See the comment in WebGLObject::detachAndDeleteObject(). |
| 21 detachAndDeleteObject(); |
| 22 } |
| 23 |
| 24 WebGLTimerQueryEXT::WebGLTimerQueryEXT(WebGLRenderingContextBase* ctx) |
| 25 : WebGLContextObject(ctx) |
| 26 , m_target(0) |
| 27 , m_queryId(0) |
| 28 { |
| 29 m_queryId = context()->webContext()->createQueryEXT(); |
| 30 } |
| 31 |
| 32 void WebGLTimerQueryEXT::deleteObjectImpl(WebGraphicsContext3D* context3d) |
| 33 { |
| 34 context3d->deleteQueryEXT(m_queryId); |
| 35 m_queryId = 0; |
| 36 } |
| 37 |
| 38 } // namespace blink |
OLD | NEW |