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

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

Issue 12806006: Add EncodeBackbufferCHROMIUM support to GLES2 command stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src@yuv_2
Patch Set: Removed extraneous file. 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
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 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 WGC3Denum target) { 1705 WGC3Denum target) {
1706 return gl_->WaitAsyncTexImage2DCHROMIUM(target); 1706 return gl_->WaitAsyncTexImage2DCHROMIUM(target);
1707 } 1707 }
1708 1708
1709 void WebGraphicsContext3DCommandBufferImpl::drawBuffersEXT( 1709 void WebGraphicsContext3DCommandBufferImpl::drawBuffersEXT(
1710 WGC3Dsizei n, 1710 WGC3Dsizei n,
1711 const WGC3Denum* bufs) { 1711 const WGC3Denum* bufs) {
1712 gl_->DrawBuffersEXT(n, bufs); 1712 gl_->DrawBuffersEXT(n, bufs);
1713 } 1713 }
1714 1714
1715 void WebGraphicsContext3DCommandBufferImpl::encodeBackbufferCHROMIUM() {
1716 gl_->EncodeBackbufferCHROMIUM();
1717 }
1718
1715 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { 1719 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1716 return webkit::gpu::CreateCommandBufferSkiaGLBinding(); 1720 return webkit::gpu::CreateCommandBufferSkiaGLBinding();
1717 } 1721 }
1718 1722
1719 namespace { 1723 namespace {
1720 1724
1721 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { 1725 WGC3Denum convertReason(gpu::error::ContextLostReason reason) {
1722 switch (reason) { 1726 switch (reason) {
1723 case gpu::error::kGuilty: 1727 case gpu::error::kGuilty:
1724 return GL_GUILTY_CONTEXT_RESET_ARB; 1728 return GL_GUILTY_CONTEXT_RESET_ARB;
(...skipping 23 matching lines...) Expand all
1748 1752
1749 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1753 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1750 const std::string& message, int id) { 1754 const std::string& message, int id) {
1751 if (error_message_callback_) { 1755 if (error_message_callback_) {
1752 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1756 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1753 error_message_callback_->onErrorMessage(str, id); 1757 error_message_callback_->onErrorMessage(str, id);
1754 } 1758 }
1755 } 1759 }
1756 1760
1757 } // namespace content 1761 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698