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

Side by Side Diff: content/renderer/pepper/pepper_platform_context_3d_impl.cc

Issue 13647014: Attach flag to use virtual context for WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove printf... Created 7 years, 8 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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | 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/renderer/pepper/pepper_platform_context_3d_impl.h" 5 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/common/gpu/client/context_provider_command_buffer.h" 8 #include "content/common/gpu/client/context_provider_command_buffer.h"
9 #include "content/common/gpu/client/gpu_channel_host.h" 9 #include "content/common/gpu/client/gpu_channel_host.h"
10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 static_cast<PlatformContext3DImpl*>(share_context); 96 static_cast<PlatformContext3DImpl*>(share_context);
97 share_buffer = share_impl->command_buffer_; 97 share_buffer = share_impl->command_buffer_;
98 } 98 }
99 99
100 command_buffer_ = channel_->CreateOffscreenCommandBuffer( 100 command_buffer_ = channel_->CreateOffscreenCommandBuffer(
101 surface_size, 101 surface_size,
102 share_buffer, 102 share_buffer,
103 "*", 103 "*",
104 attribs, 104 attribs,
105 GURL::EmptyGURL(), 105 GURL::EmptyGURL(),
106 false,
106 gpu_preference); 107 gpu_preference);
107 if (!command_buffer_) 108 if (!command_buffer_)
108 return false; 109 return false;
109 110
110 command_buffer_->SetChannelErrorCallback( 111 command_buffer_->SetChannelErrorCallback(
111 base::Bind(&PlatformContext3DImpl::OnContextLost, 112 base::Bind(&PlatformContext3DImpl::OnContextLost,
112 weak_ptr_factory_.GetWeakPtr())); 113 weak_ptr_factory_.GetWeakPtr()));
113 command_buffer_->SetOnConsoleMessageCallback( 114 command_buffer_->SetOnConsoleMessageCallback(
114 base::Bind(&PlatformContext3DImpl::OnConsoleMessage, 115 base::Bind(&PlatformContext3DImpl::OnConsoleMessage,
115 weak_ptr_factory_.GetWeakPtr())); 116 weak_ptr_factory_.GetWeakPtr()));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void PlatformContext3DImpl::OnConsoleMessage(const std::string& msg, int id) { 210 void PlatformContext3DImpl::OnConsoleMessage(const std::string& msg, int id) {
210 DCHECK(command_buffer_); 211 DCHECK(command_buffer_);
211 212
212 if (!console_message_callback_.is_null()) 213 if (!console_message_callback_.is_null())
213 console_message_callback_.Run(msg, id); 214 console_message_callback_.Run(msg, id);
214 } 215 }
215 216
216 } // namespace content 217 } // namespace content
217 218
218 #endif // ENABLE_GPU 219 #endif // ENABLE_GPU
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698