| 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 c4ef7d9f48e1c102f44e27cfca6bee9182446b64..867cc49dcb3649b52f59233d9eb39efda3e925e7 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLQuery.h
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLQuery.h
|
| @@ -11,7 +11,7 @@ namespace blink {
|
|
|
| class WebGL2RenderingContextBase;
|
|
|
| -class WebGLQuery : public WebGLSharedPlatform3DObject {
|
| +class WebGLQuery : public WebGLSharedPlatform3DObject, public WebThread::TaskObserver {
|
| DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| ~WebGLQuery() override;
|
| @@ -19,8 +19,15 @@ public:
|
| static WebGLQuery* create(WebGL2RenderingContextBase*);
|
|
|
| void setTarget(GLenum);
|
| + bool hasTarget() const { return m_target != 0; }
|
| GLenum getTarget() const { return m_target; }
|
|
|
| + void resetCachedResult();
|
| + void updateCachedResult(WebGraphicsContext3D*);
|
| +
|
| + bool isQueryResultAvailable();
|
| + GLuint getQueryResult();
|
| +
|
| protected:
|
| explicit WebGLQuery(WebGL2RenderingContextBase*);
|
|
|
| @@ -29,7 +36,19 @@ protected:
|
| private:
|
| bool isQuery() const override { return true; }
|
|
|
| + void registerTaskObserver();
|
| + void unregisterTaskObserver();
|
| +
|
| + // TaskObserver implementation.
|
| + void didProcessTask() override;
|
| + void willProcessTask() override { }
|
| +
|
| GLenum m_target;
|
| +
|
| + bool m_taskObserverRegistered;
|
| + bool m_canUpdateAvailability;
|
| + bool m_queryResultAvailable;
|
| + GLuint m_queryResult;
|
| };
|
|
|
| } // namespace blink
|
|
|