| 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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 return gl_->AsyncTexSubImage2DCHROMIUM( | 1697 return gl_->AsyncTexSubImage2DCHROMIUM( |
| 1698 target, level, xoffset, yoffset, | 1698 target, level, xoffset, yoffset, |
| 1699 width, height, format, type, pixels); | 1699 width, height, format, type, pixels); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 void WebGraphicsContext3DCommandBufferImpl::waitAsyncTexImage2DCHROMIUM( | 1702 void WebGraphicsContext3DCommandBufferImpl::waitAsyncTexImage2DCHROMIUM( |
| 1703 WGC3Denum target) { | 1703 WGC3Denum target) { |
| 1704 return gl_->WaitAsyncTexImage2DCHROMIUM(target); | 1704 return gl_->WaitAsyncTexImage2DCHROMIUM(target); |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 void WebGraphicsContext3DCommandBufferImpl::drawBuffersEXT( |
| 1708 WGC3Dsizei n, |
| 1709 const WGC3Denum* bufs) { |
| 1710 gl_->DrawBuffersEXT(n, bufs); |
| 1711 } |
| 1712 |
| 1707 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1713 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
| 1708 return webkit::gpu::CreateCommandBufferSkiaGLBinding(); | 1714 return webkit::gpu::CreateCommandBufferSkiaGLBinding(); |
| 1709 } | 1715 } |
| 1710 | 1716 |
| 1711 namespace { | 1717 namespace { |
| 1712 | 1718 |
| 1713 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { | 1719 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { |
| 1714 switch (reason) { | 1720 switch (reason) { |
| 1715 case gpu::error::kGuilty: | 1721 case gpu::error::kGuilty: |
| 1716 return GL_GUILTY_CONTEXT_RESET_ARB; | 1722 return GL_GUILTY_CONTEXT_RESET_ARB; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1740 | 1746 |
| 1741 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1747 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1742 const std::string& message, int id) { | 1748 const std::string& message, int id) { |
| 1743 if (error_message_callback_) { | 1749 if (error_message_callback_) { |
| 1744 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1750 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1745 error_message_callback_->onErrorMessage(str, id); | 1751 error_message_callback_->onErrorMessage(str, id); |
| 1746 } | 1752 } |
| 1747 } | 1753 } |
| 1748 | 1754 |
| 1749 } // namespace content | 1755 } // namespace content |
| OLD | NEW |