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 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 WGC3Dsizei width, | 1691 WGC3Dsizei width, |
1692 WGC3Dsizei height, | 1692 WGC3Dsizei height, |
1693 WGC3Denum format, | 1693 WGC3Denum format, |
1694 WGC3Denum type, | 1694 WGC3Denum type, |
1695 const void *pixels) { | 1695 const void *pixels) { |
1696 return gl_->AsyncTexSubImage2DCHROMIUM( | 1696 return gl_->AsyncTexSubImage2DCHROMIUM( |
1697 target, level, xoffset, yoffset, | 1697 target, level, xoffset, yoffset, |
1698 width, height, format, type, pixels); | 1698 width, height, format, type, pixels); |
1699 } | 1699 } |
1700 | 1700 |
| 1701 void WebGraphicsContext3DCommandBufferImpl::waitAsyncTexImage2DCHROMIUM( |
| 1702 WGC3Denum target) { |
| 1703 return gl_->WaitAsyncTexImage2DCHROMIUM(target); |
| 1704 } |
| 1705 |
1701 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1706 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
1702 return webkit::gpu::CreateCommandBufferSkiaGLBinding(); | 1707 return webkit::gpu::CreateCommandBufferSkiaGLBinding(); |
1703 } | 1708 } |
1704 | 1709 |
1705 namespace { | 1710 namespace { |
1706 | 1711 |
1707 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1712 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
1708 switch (reason) { | 1713 switch (reason) { |
1709 case gpu::error::kGuilty: | 1714 case gpu::error::kGuilty: |
1710 return GL_GUILTY_CONTEXT_RESET_ARB; | 1715 return GL_GUILTY_CONTEXT_RESET_ARB; |
(...skipping 23 matching lines...) Expand all Loading... |
1734 | 1739 |
1735 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1740 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1736 const std::string& message, int id) { | 1741 const std::string& message, int id) { |
1737 if (error_message_callback_) { | 1742 if (error_message_callback_) { |
1738 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1743 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1739 error_message_callback_->onErrorMessage(str, id); | 1744 error_message_callback_->onErrorMessage(str, id); |
1740 } | 1745 } |
1741 } | 1746 } |
1742 | 1747 |
1743 } // namespace content | 1748 } // namespace content |
OLD | NEW |