| 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 "gpu/command_buffer/client/gles2_interface.h" | 7 #include "gpu/command_buffer/client/gles2_interface.h" |
| 8 #include "modules/webgl/WebGL2RenderingContextBase.h" | 8 #include "modules/webgl/WebGL2RenderingContextBase.h" |
| 9 #include "public/platform/Platform.h" | 9 #include "public/platform/Platform.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 setObject(ctx->webContext()->createQueryEXT()); | 34 setObject(ctx->webContext()->createQueryEXT()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void WebGLQuery::setTarget(GLenum target) | 37 void WebGLQuery::setTarget(GLenum target) |
| 38 { | 38 { |
| 39 ASSERT(object()); | 39 ASSERT(object()); |
| 40 ASSERT(!m_target); | 40 ASSERT(!m_target); |
| 41 m_target = target; | 41 m_target = target; |
| 42 } | 42 } |
| 43 | 43 |
| 44 void WebGLQuery::deleteObjectImpl(WebGraphicsContext3D* context3d) | 44 void WebGLQuery::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2::G
LES2Interface* gl) |
| 45 { | 45 { |
| 46 context3d->deleteQueryEXT(m_object); | 46 context3d->deleteQueryEXT(m_object); |
| 47 m_object = 0; | 47 m_object = 0; |
| 48 } | 48 } |
| 49 | 49 |
| 50 void WebGLQuery::resetCachedResult() | 50 void WebGLQuery::resetCachedResult() |
| 51 { | 51 { |
| 52 m_canUpdateAvailability = false; | 52 m_canUpdateAvailability = false; |
| 53 m_queryResultAvailable = false; | 53 m_queryResultAvailable = false; |
| 54 m_queryResult = 0; | 54 m_queryResult = 0; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 Platform::current()->currentThread()->removeTaskObserver(this); | 107 Platform::current()->currentThread()->removeTaskObserver(this); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 void WebGLQuery::didProcessTask() | 111 void WebGLQuery::didProcessTask() |
| 112 { | 112 { |
| 113 m_canUpdateAvailability = true; | 113 m_canUpdateAvailability = true; |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| OLD | NEW |