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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 WebGLId, WGC3Denum, WGC3Duint*) | 1579 WebGLId, WGC3Denum, WGC3Duint*) |
1580 | 1580 |
1581 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, | 1581 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, |
1582 WebGLId, WebGLId, WGC3Dint, WGC3Denum); | 1582 WebGLId, WebGLId, WGC3Dint, WGC3Denum); |
1583 | 1583 |
1584 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, | 1584 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, |
1585 WebGLId, WGC3Dint, const WGC3Dchar*) | 1585 WebGLId, WGC3Dint, const WGC3Dchar*) |
1586 | 1586 |
1587 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); | 1587 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); |
1588 | 1588 |
1589 DELEGATE_TO_GL_1(genMailboxCHROMIUM, GenMailboxCHROMIUM, WGC3Dbyte*) | 1589 void WebGraphicsContext3DCommandBufferImpl::genMailboxCHROMIUM( |
| 1590 WGC3Dbyte* name) { |
| 1591 std::vector<std::string> names(1); |
| 1592 if (command_buffer_->GenerateMailboxNames(1, &names)) |
| 1593 memcpy(name, names[0].c_str(), GL_MAILBOX_SIZE_CHROMIUM); |
| 1594 else |
| 1595 synthesizeGLError(GL_OUT_OF_MEMORY); |
| 1596 } |
| 1597 |
1590 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, | 1598 DELEGATE_TO_GL_2(produceTextureCHROMIUM, ProduceTextureCHROMIUM, |
1591 WGC3Denum, const WGC3Dbyte*) | 1599 WGC3Denum, const WGC3Dbyte*) |
1592 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, | 1600 DELEGATE_TO_GL_2(consumeTextureCHROMIUM, ConsumeTextureCHROMIUM, |
1593 WGC3Denum, const WGC3Dbyte*) | 1601 WGC3Denum, const WGC3Dbyte*) |
1594 | 1602 |
1595 void WebGraphicsContext3DCommandBufferImpl::insertEventMarkerEXT( | 1603 void WebGraphicsContext3DCommandBufferImpl::insertEventMarkerEXT( |
1596 const WGC3Dchar* marker) { | 1604 const WGC3Dchar* marker) { |
1597 gl_->InsertEventMarkerEXT(0, marker); | 1605 gl_->InsertEventMarkerEXT(0, marker); |
1598 } | 1606 } |
1599 | 1607 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 | 1667 |
1660 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1668 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1661 const std::string& message, int id) { | 1669 const std::string& message, int id) { |
1662 if (error_message_callback_) { | 1670 if (error_message_callback_) { |
1663 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1671 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1664 error_message_callback_->onErrorMessage(str, id); | 1672 error_message_callback_->onErrorMessage(str, id); |
1665 } | 1673 } |
1666 } | 1674 } |
1667 | 1675 |
1668 } // namespace content | 1676 } // namespace content |
OLD | NEW |