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 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) | 1519 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) |
1520 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, | 1520 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, |
1521 WebGLId, WGC3Denum, WGC3Duint*) | 1521 WebGLId, WGC3Denum, WGC3Duint*) |
1522 | 1522 |
1523 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, | 1523 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, |
1524 WebGLId, WebGLId, WGC3Dint, WGC3Denum); | 1524 WebGLId, WebGLId, WGC3Dint, WGC3Denum); |
1525 | 1525 |
1526 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, | 1526 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, |
1527 WebGLId, WGC3Dint, const WGC3Dchar*) | 1527 WebGLId, WGC3Dint, const WGC3Dchar*) |
1528 | 1528 |
| 1529 DELEGATE_TO_GL_2(texImagePixmap2DCHROMIUM, TexImagePixmap2DCHROMIUM, |
| 1530 WGC3Denum, WGC3Duint) |
| 1531 |
1529 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1532 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
1530 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1533 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
1531 } | 1534 } |
1532 | 1535 |
1533 namespace { | 1536 namespace { |
1534 | 1537 |
1535 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1538 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
1536 switch (reason) { | 1539 switch (reason) { |
1537 case gpu::error::kGuilty: | 1540 case gpu::error::kGuilty: |
1538 return GL_GUILTY_CONTEXT_RESET_ARB; | 1541 return GL_GUILTY_CONTEXT_RESET_ARB; |
(...skipping 21 matching lines...) Expand all Loading... |
1560 swap_client_->OnViewContextSwapBuffersAborted(); | 1563 swap_client_->OnViewContextSwapBuffersAborted(); |
1561 } | 1564 } |
1562 | 1565 |
1563 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1566 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1564 const std::string& message, int id) { | 1567 const std::string& message, int id) { |
1565 if (error_message_callback_) { | 1568 if (error_message_callback_) { |
1566 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1569 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1567 error_message_callback_->onErrorMessage(str, id); | 1570 error_message_callback_->onErrorMessage(str, id); |
1568 } | 1571 } |
1569 } | 1572 } |
OLD | NEW |