| 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 #include "modules/webgl/WebGLQuery.h" | 5 #include "modules/webgl/WebGLQuery.h" |
| 6 | 6 |
| 7 #include "core/dom/TaskRunnerHelper.h" | 7 #include "core/dom/TaskRunnerHelper.h" |
| 8 #include "gpu/command_buffer/client/gles2_interface.h" | 8 #include "gpu/command_buffer/client/gles2_interface.h" |
| 9 #include "modules/webgl/WebGL2RenderingContextBase.h" | 9 #include "modules/webgl/WebGL2RenderingContextBase.h" |
| 10 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 GLuint WebGLQuery::getQueryResult() { | 85 GLuint WebGLQuery::getQueryResult() { |
| 86 return m_queryResult; | 86 return m_queryResult; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void WebGLQuery::scheduleAllowAvailabilityUpdate() { | 89 void WebGLQuery::scheduleAllowAvailabilityUpdate() { |
| 90 if (m_taskHandle.isActive()) | 90 if (m_taskHandle.isActive()) |
| 91 return; | 91 return; |
| 92 m_taskHandle = m_taskRunner->postCancellableTask( | 92 m_taskHandle = m_taskRunner->postCancellableTask( |
| 93 BLINK_FROM_HERE, WTF::bind(&WebGLQuery::allowAvailabilityUpdate, | 93 BLINK_FROM_HERE, |
| 94 wrapWeakPersistent(this))); | 94 WTF::bind(&WebGLQuery::allowAvailabilityUpdate, |
| 95 wrapWeakPersistent(this))); |
| 95 } | 96 } |
| 96 | 97 |
| 97 void WebGLQuery::allowAvailabilityUpdate() { | 98 void WebGLQuery::allowAvailabilityUpdate() { |
| 98 m_canUpdateAvailability = true; | 99 m_canUpdateAvailability = true; |
| 99 } | 100 } |
| 100 | 101 |
| 101 } // namespace blink | 102 } // namespace blink |
| OLD | NEW |