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

Unified Diff: Source/modules/webgl/WebGLTimerQueryEXT.h

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/WebGLRenderingContextBase.cpp ('k') | Source/modules/webgl/WebGLTimerQueryEXT.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLTimerQueryEXT.h
diff --git a/Source/modules/webgl/WebGLTimerQueryEXT.h b/Source/modules/webgl/WebGLTimerQueryEXT.h
new file mode 100644
index 0000000000000000000000000000000000000000..feef5be1b762a0e0fed1524fa9e5410604b836a6
--- /dev/null
+++ b/Source/modules/webgl/WebGLTimerQueryEXT.h
@@ -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.
+
+#ifndef WebGLTimerQueryEXT_h
+#define WebGLTimerQueryEXT_h
+
+#include "modules/webgl/WebGLContextObject.h"
+
+namespace blink {
+
+class WebGLTimerQueryEXT : public WebGLContextObject {
+ DEFINE_WRAPPERTYPEINFO();
+
+public:
+ static WebGLTimerQueryEXT* create(WebGLRenderingContextBase*);
+ ~WebGLTimerQueryEXT() override;
+
+ void setTarget(GLenum target) { m_target = target; }
+
+ GLuint object() const { return m_queryId; }
+ bool hasTarget() const { return m_target != 0; }
+ GLenum target() const { return m_target; }
+
+protected:
+ WebGLTimerQueryEXT(WebGLRenderingContextBase*);
+
+private:
+ bool hasObject() const override { return m_queryId != 0; }
+ void deleteObjectImpl(WebGraphicsContext3D*) override;
+
+ GLenum m_target;
+ GLuint m_queryId;
+};
+
+} // namespace blink
+
+#endif // WebGLTimerQueryEXT_h
« no previous file with comments | « Source/modules/webgl/WebGLRenderingContextBase.cpp ('k') | Source/modules/webgl/WebGLTimerQueryEXT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698