| 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/EXTDisjointTimerQuery.h" |    5 #include "modules/webgl/EXTDisjointTimerQuery.h" | 
|    6  |    6  | 
|    7 #include "bindings/modules/v8/WebGLAny.h" |    7 #include "bindings/modules/v8/WebGLAny.h" | 
|    8 #include "gpu/command_buffer/client/gles2_interface.h" |    8 #include "gpu/command_buffer/client/gles2_interface.h" | 
|    9 #include "modules/webgl/WebGLRenderingContextBase.h" |    9 #include "modules/webgl/WebGLRenderingContextBase.h" | 
|   10 #include "modules/webgl/WebGLTimerQueryEXT.h" |   10 #include "modules/webgl/WebGLTimerQueryEXT.h" | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   45     WebGLTimerQueryEXT* o = WebGLTimerQueryEXT::create(scoped.context()); |   45     WebGLTimerQueryEXT* o = WebGLTimerQueryEXT::create(scoped.context()); | 
|   46     scoped.context()->addContextObject(o); |   46     scoped.context()->addContextObject(o); | 
|   47     return o; |   47     return o; | 
|   48 } |   48 } | 
|   49  |   49  | 
|   50 void EXTDisjointTimerQuery::deleteQueryEXT(WebGLTimerQueryEXT* query) |   50 void EXTDisjointTimerQuery::deleteQueryEXT(WebGLTimerQueryEXT* query) | 
|   51 { |   51 { | 
|   52     WebGLExtensionScopedContext scoped(this); |   52     WebGLExtensionScopedContext scoped(this); | 
|   53     if (!query || scoped.isLost()) |   53     if (!query || scoped.isLost()) | 
|   54         return; |   54         return; | 
|   55     query->deleteObject(scoped.context()->webContext()); |   55     query->deleteObject(scoped.context()->webContext(), scoped.context()->contex
     tGL()); | 
|   56  |   56  | 
|   57     if (query == m_currentElapsedQuery) |   57     if (query == m_currentElapsedQuery) | 
|   58         m_currentElapsedQuery.clear(); |   58         m_currentElapsedQuery.clear(); | 
|   59 } |   59 } | 
|   60  |   60  | 
|   61 GLboolean EXTDisjointTimerQuery::isQueryEXT(WebGLTimerQueryEXT* query) |   61 GLboolean EXTDisjointTimerQuery::isQueryEXT(WebGLTimerQueryEXT* query) | 
|   62 { |   62 { | 
|   63     WebGLExtensionScopedContext scoped(this); |   63     WebGLExtensionScopedContext scoped(this); | 
|   64     if (!query || scoped.isLost() || query->isDeleted() || !query->validate(0, s
     coped.context())) { |   64     if (!query || scoped.isLost() || query->isDeleted() || !query->validate(0, s
     coped.context())) { | 
|   65         return false; |   65         return false; | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  206     WebGLExtension::trace(visitor); |  206     WebGLExtension::trace(visitor); | 
|  207 } |  207 } | 
|  208  |  208  | 
|  209 EXTDisjointTimerQuery::EXTDisjointTimerQuery(WebGLRenderingContextBase* context) |  209 EXTDisjointTimerQuery::EXTDisjointTimerQuery(WebGLRenderingContextBase* context) | 
|  210     : WebGLExtension(context) |  210     : WebGLExtension(context) | 
|  211 { |  211 { | 
|  212     context->extensionsUtil()->ensureExtensionEnabled("GL_EXT_disjoint_timer_que
     ry"); |  212     context->extensionsUtil()->ensureExtensionEnabled("GL_EXT_disjoint_timer_que
     ry"); | 
|  213 } |  213 } | 
|  214  |  214  | 
|  215 } // namespace blink |  215 } // namespace blink | 
| OLD | NEW |