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