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 25 matching lines...) Expand all Loading... |
36 setObject(query); | 36 setObject(query); |
37 } | 37 } |
38 | 38 |
39 void WebGLQuery::setTarget(GLenum target) | 39 void WebGLQuery::setTarget(GLenum target) |
40 { | 40 { |
41 ASSERT(object()); | 41 ASSERT(object()); |
42 ASSERT(!m_target); | 42 ASSERT(!m_target); |
43 m_target = target; | 43 m_target = target; |
44 } | 44 } |
45 | 45 |
46 void WebGLQuery::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2::G
LES2Interface* gl) | 46 void WebGLQuery::deleteObjectImpl(gpu::gles2::GLES2Interface* gl) |
47 { | 47 { |
48 gl->DeleteQueriesEXT(1, &m_object); | 48 gl->DeleteQueriesEXT(1, &m_object); |
49 m_object = 0; | 49 m_object = 0; |
50 } | 50 } |
51 | 51 |
52 void WebGLQuery::resetCachedResult() | 52 void WebGLQuery::resetCachedResult() |
53 { | 53 { |
54 m_canUpdateAvailability = false; | 54 m_canUpdateAvailability = false; |
55 m_queryResultAvailable = false; | 55 m_queryResultAvailable = false; |
56 m_queryResult = 0; | 56 m_queryResult = 0; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 Platform::current()->currentThread()->removeTaskObserver(this); | 109 Platform::current()->currentThread()->removeTaskObserver(this); |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 void WebGLQuery::didProcessTask() | 113 void WebGLQuery::didProcessTask() |
114 { | 114 { |
115 m_canUpdateAvailability = true; | 115 m_canUpdateAvailability = true; |
116 } | 116 } |
117 | 117 |
118 } // namespace blink | 118 } // namespace blink |
OLD | NEW |