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 { | 10 namespace gpu { |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 void resetCachedResult(); | 31 void resetCachedResult(); |
32 void updateCachedResult(gpu::gles2::GLES2Interface*); | 32 void updateCachedResult(gpu::gles2::GLES2Interface*); |
33 | 33 |
34 bool isQueryResultAvailable(); | 34 bool isQueryResultAvailable(); |
35 GLuint getQueryResult(); | 35 GLuint getQueryResult(); |
36 | 36 |
37 protected: | 37 protected: |
38 explicit WebGLQuery(WebGL2RenderingContextBase*); | 38 explicit WebGLQuery(WebGL2RenderingContextBase*); |
39 | 39 |
40 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov
erride; | 40 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; |
41 | 41 |
42 private: | 42 private: |
43 bool isQuery() const override { return true; } | 43 bool isQuery() const override { return true; } |
44 | 44 |
45 void registerTaskObserver(); | 45 void registerTaskObserver(); |
46 void unregisterTaskObserver(); | 46 void unregisterTaskObserver(); |
47 | 47 |
48 // TaskObserver implementation. | 48 // TaskObserver implementation. |
49 void didProcessTask() override; | 49 void didProcessTask() override; |
50 void willProcessTask() override { } | 50 void willProcessTask() override { } |
51 | 51 |
52 GLenum m_target; | 52 GLenum m_target; |
53 | 53 |
54 bool m_taskObserverRegistered; | 54 bool m_taskObserverRegistered; |
55 bool m_canUpdateAvailability; | 55 bool m_canUpdateAvailability; |
56 bool m_queryResultAvailable; | 56 bool m_queryResultAvailable; |
57 GLuint m_queryResult; | 57 GLuint m_queryResult; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace blink | 60 } // namespace blink |
61 | 61 |
62 #endif // WebGLQuery_h | 62 #endif // WebGLQuery_h |
OLD | NEW |