| 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 WebGLTimerQueryEXT_h | 5 #ifndef WebGLTimerQueryEXT_h |
| 6 #define WebGLTimerQueryEXT_h | 6 #define WebGLTimerQueryEXT_h |
| 7 | 7 |
| 8 #include "modules/webgl/WebGLContextObject.h" | 8 #include "modules/webgl/WebGLContextObject.h" |
| 9 | 9 |
| 10 #include "public/platform/WebThread.h" | 10 #include "public/platform/WebThread.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 void updateCachedResult(gpu::gles2::GLES2Interface*); | 34 void updateCachedResult(gpu::gles2::GLES2Interface*); |
| 35 | 35 |
| 36 bool isQueryResultAvailable(); | 36 bool isQueryResultAvailable(); |
| 37 GLuint64 getQueryResult(); | 37 GLuint64 getQueryResult(); |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 WebGLTimerQueryEXT(WebGLRenderingContextBase*); | 40 WebGLTimerQueryEXT(WebGLRenderingContextBase*); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 bool hasObject() const override { return m_queryId != 0; } | 43 bool hasObject() const override { return m_queryId != 0; } |
| 44 void deleteObjectImpl(WebGraphicsContext3D*) override; | 44 void deleteObjectImpl(WebGraphicsContext3D*, gpu::gles2::GLES2Interface*) ov
erride; |
| 45 | 45 |
| 46 void registerTaskObserver(); | 46 void registerTaskObserver(); |
| 47 void unregisterTaskObserver(); | 47 void unregisterTaskObserver(); |
| 48 | 48 |
| 49 // TaskObserver implementation. | 49 // TaskObserver implementation. |
| 50 void didProcessTask() override; | 50 void didProcessTask() override; |
| 51 void willProcessTask() override { } | 51 void willProcessTask() override { } |
| 52 | 52 |
| 53 GLenum m_target; | 53 GLenum m_target; |
| 54 GLuint m_queryId; | 54 GLuint m_queryId; |
| 55 | 55 |
| 56 bool m_taskObserverRegistered; | 56 bool m_taskObserverRegistered; |
| 57 bool m_canUpdateAvailability; | 57 bool m_canUpdateAvailability; |
| 58 bool m_queryResultAvailable; | 58 bool m_queryResultAvailable; |
| 59 GLuint64 m_queryResult; | 59 GLuint64 m_queryResult; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| 63 | 63 |
| 64 #endif // WebGLTimerQueryEXT_h | 64 #endif // WebGLTimerQueryEXT_h |
| OLD | NEW |