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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 gl_->DeleteQueriesEXT(1, &query); | 1595 gl_->DeleteQueriesEXT(1, &query); |
1596 } | 1596 } |
1597 | 1597 |
1598 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) | 1598 DELEGATE_TO_GL_1R(isQueryEXT, IsQueryEXT, WebGLId, WGC3Dboolean) |
1599 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) | 1599 DELEGATE_TO_GL_2(beginQueryEXT, BeginQueryEXT, WGC3Denum, WebGLId) |
1600 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) | 1600 DELEGATE_TO_GL_1(endQueryEXT, EndQueryEXT, WGC3Denum) |
1601 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) | 1601 DELEGATE_TO_GL_3(getQueryivEXT, GetQueryivEXT, WGC3Denum, WGC3Denum, WGC3Dint*) |
1602 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, | 1602 DELEGATE_TO_GL_3(getQueryObjectuivEXT, GetQueryObjectuivEXT, |
1603 WebGLId, WGC3Denum, WGC3Duint*) | 1603 WebGLId, WGC3Denum, WGC3Duint*) |
1604 | 1604 |
1605 DELEGATE_TO_GL_5(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, | 1605 DELEGATE_TO_GL_6(copyTextureCHROMIUM, CopyTextureCHROMIUM, WGC3Denum, |
1606 WebGLId, WebGLId, WGC3Dint, WGC3Denum); | 1606 WebGLId, WebGLId, WGC3Dint, WGC3Denum, WGC3Denum); |
| 1607 |
| 1608 // This copyTextureCHROMIUM(...) has five parameters and delegates the call to |
| 1609 // CopyTextureCHROMIUM(...) with the sixth parameter set to GL_UNSIGNED_BYTE |
| 1610 // to bridge the parameter differences. |
| 1611 // TODO(jun.a.jiang@intel.com): once all clients switch to call |
| 1612 // the newer copyTextureCHROMIUM(...) with six parameters, this |
| 1613 // function will be removed. |
| 1614 void WebGraphicsContext3DCommandBufferImpl::copyTextureCHROMIUM( |
| 1615 WGC3Denum target, WebGLId source_id, WebGLId dest_id, WGC3Dint level, |
| 1616 WGC3Denum internal_format) { |
| 1617 gl_->CopyTextureCHROMIUM(target, source_id, dest_id, level, internal_format, |
| 1618 GL_UNSIGNED_BYTE); |
| 1619 } |
1607 | 1620 |
1608 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, | 1621 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, |
1609 WebGLId, WGC3Dint, const WGC3Dchar*) | 1622 WebGLId, WGC3Dint, const WGC3Dchar*) |
1610 | 1623 |
1611 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); | 1624 DELEGATE_TO_GL(shallowFlushCHROMIUM,ShallowFlushCHROMIUM); |
1612 | 1625 |
1613 DELEGATE_TO_GL_1(waitSyncPoint, WaitSyncPointCHROMIUM, GLuint) | 1626 DELEGATE_TO_GL_1(waitSyncPoint, WaitSyncPointCHROMIUM, GLuint) |
1614 | 1627 |
1615 void WebGraphicsContext3DCommandBufferImpl::genMailboxCHROMIUM( | 1628 void WebGraphicsContext3DCommandBufferImpl::genMailboxCHROMIUM( |
1616 WGC3Dbyte* name) { | 1629 WGC3Dbyte* name) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 | 1757 |
1745 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1758 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1746 const std::string& message, int id) { | 1759 const std::string& message, int id) { |
1747 if (error_message_callback_) { | 1760 if (error_message_callback_) { |
1748 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1761 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1749 error_message_callback_->onErrorMessage(str, id); | 1762 error_message_callback_->onErrorMessage(str, id); |
1750 } | 1763 } |
1751 } | 1764 } |
1752 | 1765 |
1753 } // namespace content | 1766 } // namespace content |
OLD | NEW |