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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 9693045: WebKit support for EXT_occlusion_query. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize GL object Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) { 1160 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) {
1161 swapbuffers_complete_callback_ = cb; 1161 swapbuffers_complete_callback_ = cb;
1162 } 1162 }
1163 1163
1164 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, 1164 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM,
1165 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) 1165 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint)
1166 1166
1167 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, 1167 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT,
1168 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) 1168 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint)
1169 1169
1170 WebGLId WebGraphicsContext3DCommandBufferImpl::createQueryEXT() {
1171 GLuint o;
1172 gl_->GenQueriesEXT(1, &o);
1173 return o;
1174 }
1175
1176 void WebGraphicsContext3DCommandBufferImpl::deleteQueryEXT(
1177 WebGLId query) {
1178 gl_->DeleteQueriesEXT(1, &query);
1179 }
1180
1181 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean)
1182 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId)
1183 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum)
1184 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*)
1185 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT,
1186 WebGLId, WGC3Denum, WGC3Duint*)
1187
1170 #if WEBKIT_USING_SKIA 1188 #if WEBKIT_USING_SKIA
1171 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { 1189 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1172 return webkit_glue::CreateCommandBufferSkiaGLBinding(); 1190 return webkit_glue::CreateCommandBufferSkiaGLBinding();
1173 } 1191 }
1174 #endif 1192 #endif
1175 1193
1176 namespace { 1194 namespace {
1177 1195
1178 WGC3Denum convertReason(ContentGLContext::ContextLostReason reason) { 1196 WGC3Denum convertReason(ContentGLContext::ContextLostReason reason) {
1179 switch (reason) { 1197 switch (reason) {
(...skipping 24 matching lines...) Expand all
1204 } 1222 }
1205 1223
1206 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1224 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1207 const std::string& message, int id) { 1225 const std::string& message, int id) {
1208 if (error_message_callback_) { 1226 if (error_message_callback_) {
1209 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1227 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1210 error_message_callback_->onErrorMessage(str, id); 1228 error_message_callback_->onErrorMessage(str, id);
1211 } 1229 }
1212 } 1230 }
1213 1231
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698