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

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

Issue 11348231: Move gl_bindings_skia_cmd_buffer into webkit_gpu and make the latter a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing dep Created 8 years 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 #include "content/common/gpu/client/gpu_channel_host.h" 27 #include "content/common/gpu/client/gpu_channel_host.h"
28 #include "content/common/gpu/gpu_process_launch_causes.h" 28 #include "content/common/gpu/gpu_process_launch_causes.h"
29 #include "content/public/common/content_constants.h" 29 #include "content/public/common/content_constants.h"
30 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
31 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 31 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
32 #include "gpu/command_buffer/client/gles2_implementation.h" 32 #include "gpu/command_buffer/client/gles2_implementation.h"
33 #include "gpu/command_buffer/client/gles2_lib.h" 33 #include "gpu/command_buffer/client/gles2_lib.h"
34 #include "gpu/command_buffer/client/transfer_buffer.h" 34 #include "gpu/command_buffer/client/transfer_buffer.h"
35 #include "gpu/command_buffer/common/constants.h" 35 #include "gpu/command_buffer/common/constants.h"
36 #include "gpu/ipc/command_buffer_proxy.h" 36 #include "gpu/ipc/command_buffer_proxy.h"
37 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" 37 #include "webkit/gpu/gl_bindings_skia_cmd_buffer.h"
38 38
39 namespace content { 39 namespace content {
40 static base::LazyInstance<base::Lock>::Leaky 40 static base::LazyInstance<base::Lock>::Leaky
41 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER; 41 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
42 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> > 42 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> >
43 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER; 43 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
44 44
45 namespace { 45 namespace {
46 46
47 void ClearSharedContextsIfInShareSet( 47 void ClearSharedContextsIfInShareSet(
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 WGC3Denum target, WGC3Denum access) { 1638 WGC3Denum target, WGC3Denum access) {
1639 return gl_->MapBufferCHROMIUM(target, access); 1639 return gl_->MapBufferCHROMIUM(target, access);
1640 } 1640 }
1641 1641
1642 WGC3Dboolean WebGraphicsContext3DCommandBufferImpl::unmapBufferCHROMIUM( 1642 WGC3Dboolean WebGraphicsContext3DCommandBufferImpl::unmapBufferCHROMIUM(
1643 WGC3Denum target) { 1643 WGC3Denum target) {
1644 return gl_->UnmapBufferCHROMIUM(target); 1644 return gl_->UnmapBufferCHROMIUM(target);
1645 } 1645 }
1646 1646
1647 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { 1647 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1648 return webkit_glue::CreateCommandBufferSkiaGLBinding(); 1648 return webkit::gpu::CreateCommandBufferSkiaGLBinding();
1649 } 1649 }
1650 1650
1651 namespace { 1651 namespace {
1652 1652
1653 WGC3Denum convertReason(gpu::error::ContextLostReason reason) { 1653 WGC3Denum convertReason(gpu::error::ContextLostReason reason) {
1654 switch (reason) { 1654 switch (reason) {
1655 case gpu::error::kGuilty: 1655 case gpu::error::kGuilty:
1656 return GL_GUILTY_CONTEXT_RESET_ARB; 1656 return GL_GUILTY_CONTEXT_RESET_ARB;
1657 case gpu::error::kInnocent: 1657 case gpu::error::kInnocent:
1658 return GL_INNOCENT_CONTEXT_RESET_ARB; 1658 return GL_INNOCENT_CONTEXT_RESET_ARB;
(...skipping 21 matching lines...) Expand all
1680 1680
1681 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1681 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1682 const std::string& message, int id) { 1682 const std::string& message, int id) {
1683 if (error_message_callback_) { 1683 if (error_message_callback_) {
1684 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1684 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1685 error_message_callback_->onErrorMessage(str, id); 1685 error_message_callback_->onErrorMessage(str, id);
1686 } 1686 }
1687 } 1687 }
1688 1688
1689 } // namespace content 1689 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698