| OLD | NEW | 
|   1 // Copyright 2015 The Chromium Authors. All rights reserved. |   1 // Copyright 2015 The Chromium Authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #ifndef WebGLQuery_h |   5 #ifndef WebGLQuery_h | 
|   6 #define WebGLQuery_h |   6 #define WebGLQuery_h | 
|   7  |   7  | 
|   8 #include "modules/webgl/WebGLSharedPlatform3DObject.h" |   8 #include "modules/webgl/WebGLSharedPlatform3DObject.h" | 
|   9  |   9  | 
 |  10 namespace gpu { | 
 |  11 namespace gles2 { | 
 |  12 class GLES2Interface; | 
 |  13 } | 
 |  14 } | 
 |  15  | 
|  10 namespace blink { |  16 namespace blink { | 
|  11  |  17  | 
|  12 class WebGL2RenderingContextBase; |  18 class WebGL2RenderingContextBase; | 
|  13  |  19  | 
|  14 class WebGLQuery : public WebGLSharedPlatform3DObject, public WebThread::TaskObs
    erver { |  20 class WebGLQuery : public WebGLSharedPlatform3DObject, public WebThread::TaskObs
    erver { | 
|  15     DEFINE_WRAPPERTYPEINFO(); |  21     DEFINE_WRAPPERTYPEINFO(); | 
|  16 public: |  22 public: | 
|  17     ~WebGLQuery() override; |  23     ~WebGLQuery() override; | 
|  18  |  24  | 
|  19     static WebGLQuery* create(WebGL2RenderingContextBase*); |  25     static WebGLQuery* create(WebGL2RenderingContextBase*); | 
|  20  |  26  | 
|  21     void setTarget(GLenum); |  27     void setTarget(GLenum); | 
|  22     bool hasTarget() const { return m_target != 0; } |  28     bool hasTarget() const { return m_target != 0; } | 
|  23     GLenum getTarget() const { return m_target; } |  29     GLenum getTarget() const { return m_target; } | 
|  24  |  30  | 
|  25     void resetCachedResult(); |  31     void resetCachedResult(); | 
|  26     void updateCachedResult(WebGraphicsContext3D*); |  32     void updateCachedResult(gpu::gles2::GLES2Interface*); | 
|  27  |  33  | 
|  28     bool isQueryResultAvailable(); |  34     bool isQueryResultAvailable(); | 
|  29     GLuint getQueryResult(); |  35     GLuint getQueryResult(); | 
|  30  |  36  | 
|  31 protected: |  37 protected: | 
|  32     explicit WebGLQuery(WebGL2RenderingContextBase*); |  38     explicit WebGLQuery(WebGL2RenderingContextBase*); | 
|  33  |  39  | 
|  34     void deleteObjectImpl(WebGraphicsContext3D*) override; |  40     void deleteObjectImpl(WebGraphicsContext3D*) override; | 
|  35  |  41  | 
|  36 private: |  42 private: | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|  47  |  53  | 
|  48     bool m_taskObserverRegistered; |  54     bool m_taskObserverRegistered; | 
|  49     bool m_canUpdateAvailability; |  55     bool m_canUpdateAvailability; | 
|  50     bool m_queryResultAvailable; |  56     bool m_queryResultAvailable; | 
|  51     GLuint m_queryResult; |  57     GLuint m_queryResult; | 
|  52 }; |  58 }; | 
|  53  |  59  | 
|  54 } // namespace blink |  60 } // namespace blink | 
|  55  |  61  | 
|  56 #endif // WebGLQuery_h |  62 #endif // WebGLQuery_h | 
| OLD | NEW |