OLD | NEW |
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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 WGC3Duint) | 1337 WGC3Duint) |
1338 | 1338 |
1339 DELEGATE_TO_GL_4R(createImageCHROMIUM, | 1339 DELEGATE_TO_GL_4R(createImageCHROMIUM, |
1340 CreateImageCHROMIUM, | 1340 CreateImageCHROMIUM, |
1341 WGC3Dsizei, | 1341 WGC3Dsizei, |
1342 WGC3Dsizei, | 1342 WGC3Dsizei, |
1343 WGC3Denum, | 1343 WGC3Denum, |
1344 WGC3Denum, | 1344 WGC3Denum, |
1345 WGC3Duint); | 1345 WGC3Duint); |
1346 | 1346 |
1347 WGC3Duint WebGraphicsContext3DCommandBufferImpl::createImageCHROMIUM( | |
1348 WGC3Dsizei width, | |
1349 WGC3Dsizei height, | |
1350 WGC3Denum internalformat) { | |
1351 return gl_->CreateImageCHROMIUM( | |
1352 width, height, internalformat, GL_IMAGE_MAP_CHROMIUM); | |
1353 } | |
1354 | |
1355 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint); | 1347 DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint); |
1356 | 1348 |
1357 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM, | 1349 DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM, |
1358 WGC3Duint, WGC3Denum, GLint*); | 1350 WGC3Duint, WGC3Denum, GLint*); |
1359 | 1351 |
1360 DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*); | 1352 DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*); |
1361 | 1353 |
1362 void* WebGraphicsContext3DCommandBufferImpl::mapImageCHROMIUM( | |
1363 WGC3Duint image_id, | |
1364 WGC3Denum access) { | |
1365 return gl_->MapImageCHROMIUM(image_id); | |
1366 } | |
1367 | |
1368 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint); | 1354 DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint); |
1369 | 1355 |
1370 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT, | 1356 DELEGATE_TO_GL_6(framebufferTexture2DMultisampleEXT, |
1371 FramebufferTexture2DMultisampleEXT, | 1357 FramebufferTexture2DMultisampleEXT, |
1372 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei) | 1358 WGC3Denum, WGC3Denum, WGC3Denum, WebGLId, WGC3Dint, WGC3Dsizei) |
1373 | 1359 |
1374 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT, | 1360 DELEGATE_TO_GL_5(renderbufferStorageMultisampleEXT, |
1375 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei, | 1361 RenderbufferStorageMultisampleEXT, WGC3Denum, WGC3Dsizei, |
1376 WGC3Denum, WGC3Dsizei, WGC3Dsizei) | 1362 WGC3Denum, WGC3Dsizei, WGC3Dsizei) |
1377 | 1363 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 | 1402 |
1417 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1403 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1418 const std::string& message, int id) { | 1404 const std::string& message, int id) { |
1419 if (error_message_callback_) { | 1405 if (error_message_callback_) { |
1420 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); | 1406 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); |
1421 error_message_callback_->onErrorMessage(str, id); | 1407 error_message_callback_->onErrorMessage(str, id); |
1422 } | 1408 } |
1423 } | 1409 } |
1424 | 1410 |
1425 } // namespace content | 1411 } // namespace content |
OLD | NEW |