Chromium Code Reviews| 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*) | |
| 33 { | |
| 34 context()->webContext()->deleteQueryEXT(m_queryId); | |
|
haraken
2015/09/03 23:32:58
This looks unsafe. deleteObjectImpl() is called in
Ken Russell (switch to Gerrit)
2015/09/04 01:17:09
This is a good point and should be done, but it lo
haraken
2015/09/04 01:30:13
In conclusion, I realized that this code is safe f
David Yen
2015/09/04 16:04:41
Done.
| |
| 35 m_queryId = 0; | |
| 36 } | |
| 37 | |
| 38 } // namespace blink | |
| OLD | NEW |