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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLQuery.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGLQuery.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLQuery.h b/third_party/WebKit/Source/modules/webgl/WebGLQuery.h
index 2c98144b4638249055b4491e35a3db753c8593ff..cedbee94d42dea35deedac0b57903275c24e69cf 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLQuery.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLQuery.h
@@ -6,6 +6,7 @@
#define WebGLQuery_h
#include "modules/webgl/WebGLSharedPlatform3DObject.h"
+#include "platform/scheduler/CancellableTaskFactory.h"
namespace gpu {
namespace gles2 {
@@ -16,8 +17,9 @@ class GLES2Interface;
namespace blink {
class WebGL2RenderingContextBase;
+class WebTaskRunner;
-class WebGLQuery : public WebGLSharedPlatform3DObject, public WebThread::TaskObserver {
+class WebGLQuery : public WebGLSharedPlatform3DObject {
DEFINE_WRAPPERTYPEINFO();
public:
~WebGLQuery() override;
@@ -42,19 +44,17 @@ protected:
private:
bool isQuery() const override { return true; }
- void registerTaskObserver();
- void unregisterTaskObserver();
-
- // TaskObserver implementation.
- void didProcessTask() override;
- void willProcessTask() override { }
+ void scheduleAllowAvailabilityUpdate();
+ void allowAvailabilityUpdate();
GLenum m_target;
- bool m_taskObserverRegistered;
bool m_canUpdateAvailability;
bool m_queryResultAvailable;
GLuint m_queryResult;
+
+ std::unique_ptr<WebTaskRunner> m_taskRunner;
+ std::unique_ptr<CancellableTaskFactory> m_cancellableTaskFactory;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698