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

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

Issue 2341043002: webgl: Replace query task observer with a posted task (Closed)
Patch Set: Use CancellableTaskFactory instead Created 4 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: third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h
index 1c09661009de54f6154971e48548bf81b4ad87dd..ef9eb399220d10e2ada5e84de3b332ab5b1e9641 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.h
@@ -6,8 +6,7 @@
#define WebGLTimerQueryEXT_h
#include "modules/webgl/WebGLContextObject.h"
-
-#include "public/platform/WebThread.h"
+#include "platform/scheduler/CancellableTaskFactory.h"
namespace gpu {
namespace gles2 {
@@ -17,7 +16,9 @@ class GLES2Interface;
namespace blink {
-class WebGLTimerQueryEXT : public WebGLContextObject, public WebThread::TaskObserver {
+class WebTaskRunner;
+
+class WebGLTimerQueryEXT : public WebGLContextObject {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -43,20 +44,18 @@ private:
bool hasObject() const override { return m_queryId != 0; }
void deleteObjectImpl(gpu::gles2::GLES2Interface*) override;
- void registerTaskObserver();
- void unregisterTaskObserver();
-
- // TaskObserver implementation.
- void didProcessTask() override;
- void willProcessTask() override { }
+ void scheduleAllowAvailabilityUpdate();
+ void allowAvailabilityUpdate();
GLenum m_target;
GLuint m_queryId;
- bool m_taskObserverRegistered;
bool m_canUpdateAvailability;
bool m_queryResultAvailable;
GLuint64 m_queryResult;
+
+ std::unique_ptr<WebTaskRunner> m_taskRunner;
+ std::unique_ptr<CancellableTaskFactory> m_cancellableTaskFactory;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp ('k') | third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698