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

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

Issue 10440019: Add support for GL_CHROMIUM_pixel_transfer_buffer_object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 } 1629 }
1630 1630
1631 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean) 1631 DELEGATE_TO_GL_1R(isVertexArrayOES, IsVertexArrayOES, WebGLId, WGC3Dboolean)
1632 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId) 1632 DELEGATE_TO_GL_1(bindVertexArrayOES, BindVertexArrayOES, WebGLId)
1633 1633
1634 DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM, 1634 DELEGATE_TO_GL_2(bindTexImage2DCHROMIUM, BindTexImage2DCHROMIUM,
1635 WGC3Denum, WGC3Dint) 1635 WGC3Denum, WGC3Dint)
1636 DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM, 1636 DELEGATE_TO_GL_2(releaseTexImage2DCHROMIUM, ReleaseTexImage2DCHROMIUM,
1637 WGC3Denum, WGC3Dint) 1637 WGC3Denum, WGC3Dint)
1638 1638
1639 void* WebGraphicsContext3DCommandBufferImpl::mapBufferCHROMIUM(
1640 WGC3Denum target, WGC3Denum access) {
1641 return gl_->MapBufferCHROMIUM(target, access);
1642 }
1643
1644 WGC3Dboolean WebGraphicsContext3DCommandBufferImpl::unmapBufferCHROMIUM(
1645 WGC3Denum target) {
1646 return gl_->UnmapBufferCHROMIUM(target);
1647 }
1648
1639 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { 1649 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1640 return webkit_glue::CreateCommandBufferSkiaGLBinding(); 1650 return webkit_glue::CreateCommandBufferSkiaGLBinding();
1641 } 1651 }
1642 1652
1643 namespace { 1653 namespace {
1644 1654
1645 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { 1655 WGC3Denum convertReason(gpu::error::ContextLostReason reason) {
1646 switch (reason) { 1656 switch (reason) {
1647 case gpu::error::kGuilty: 1657 case gpu::error::kGuilty:
1648 return GL_GUILTY_CONTEXT_RESET_ARB; 1658 return GL_GUILTY_CONTEXT_RESET_ARB;
(...skipping 23 matching lines...) Expand all
1672 1682
1673 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1683 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1674 const std::string& message, int id) { 1684 const std::string& message, int id) {
1675 if (error_message_callback_) { 1685 if (error_message_callback_) {
1676 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1686 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1677 error_message_callback_->onErrorMessage(str, id); 1687 error_message_callback_->onErrorMessage(str, id);
1678 } 1688 }
1679 } 1689 }
1680 1690
1681 } // namespace content 1691 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698