Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 12545014: Implement EXT_draw_buffers WebGL extention support in command buffer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698