Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(), scoped.context()->contex tGL()); 55 query->deleteObject(scoped.context()->contextGL());
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698