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

Unified 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: GL_INVALID_ENUM when timer query not enabled for GetParameter, use context3d for deletion 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webgl/WebGLTimerQueryEXT.h ('k') | Source/modules/webgl/WebGLTimerQueryEXT.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLTimerQueryEXT.cpp
diff --git a/Source/modules/webgl/WebGLTimerQueryEXT.cpp b/Source/modules/webgl/WebGLTimerQueryEXT.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e61cb6e066560f5ad98fc985db550eec99a4a468
--- /dev/null
+++ b/Source/modules/webgl/WebGLTimerQueryEXT.cpp
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "modules/webgl/WebGLTimerQueryEXT.h"
+
+#include "modules/webgl/WebGLRenderingContextBase.h"
+
+namespace blink {
+
+WebGLTimerQueryEXT* WebGLTimerQueryEXT::create(WebGLRenderingContextBase* ctx)
+{
+ return new WebGLTimerQueryEXT(ctx);
+}
+
+WebGLTimerQueryEXT::~WebGLTimerQueryEXT()
+{
+ // See the comment in WebGLObject::detachAndDeleteObject().
+ detachAndDeleteObject();
+}
+
+WebGLTimerQueryEXT::WebGLTimerQueryEXT(WebGLRenderingContextBase* ctx)
+ : WebGLContextObject(ctx)
+ , m_target(0)
+ , m_queryId(0)
+{
+ m_queryId = context()->webContext()->createQueryEXT();
+}
+
+void WebGLTimerQueryEXT::deleteObjectImpl(WebGraphicsContext3D* context3d)
+{
+ context3d->deleteQueryEXT(m_queryId);
+ m_queryId = 0;
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/webgl/WebGLTimerQueryEXT.h ('k') | Source/modules/webgl/WebGLTimerQueryEXT.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698