Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/modules/webgl/WebGLTimerQueryEXT.cpp

Issue 1325453007: Added support for EXTDisjointTimerQuery on the Blink side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Marked EXTDisjointTimerQuery as a draft extension, also added TODO for kbr about per frame updates Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698