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

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

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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/webgl/EXTDisjointTimerQuery.h
diff --git a/Source/modules/webgl/EXTDisjointTimerQuery.h b/Source/modules/webgl/EXTDisjointTimerQuery.h
new file mode 100644
index 0000000000000000000000000000000000000000..8a3931552f10a8684e2d7f187b61e5ba6f8df8f5
--- /dev/null
+++ b/Source/modules/webgl/EXTDisjointTimerQuery.h
@@ -0,0 +1,49 @@
+// 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 EXTDisjointTimerQuery_h
+#define EXTDisjointTimerQuery_h
+
+#include "bindings/core/v8/ScriptValue.h"
+#include "modules/webgl/WebGLExtension.h"
+#include "wtf/HashMap.h"
+
+namespace blink {
+
+class WebGLRenderingContextBase;
+class WebGLTimerQueryEXT;
+
+class EXTDisjointTimerQuery final : public WebGLExtension {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static EXTDisjointTimerQuery* create(WebGLRenderingContextBase*);
+ static bool supported(WebGLRenderingContextBase*);
+ static const char* extensionName();
+
+ ~EXTDisjointTimerQuery() override;
+ WebGLExtensionName name() const override;
+
+ WebGLTimerQueryEXT* createQueryEXT();
+ void deleteQueryEXT(WebGLTimerQueryEXT*);
+ GLboolean isQueryEXT(WebGLTimerQueryEXT*);
+ void beginQueryEXT(GLenum, WebGLTimerQueryEXT*);
+ void endQueryEXT(GLenum);
+ void queryCounterEXT(WebGLTimerQueryEXT*, GLenum);
+ ScriptValue getQueryEXT(ScriptState*, GLenum, GLenum);
+ ScriptValue getQueryObjectEXT(ScriptState*, WebGLTimerQueryEXT*, GLenum);
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ friend class WebGLTimerQueryEXT;
+ explicit EXTDisjointTimerQuery(WebGLRenderingContextBase*);
+
+ void OnQueryDeleted(GLuint);
+
+ Member<WebGLTimerQueryEXT> m_currentElapsedQuery;
+};
+
+} // namespace blink
+
+#endif // EXTDisjointTimerQuery_h

Powered by Google App Engine
This is Rietveld 408576698