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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_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/client/gpu_channel_host.cc ('k') | content/common/gpu/gpu_channel.cc » ('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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 attribs.push_back(NONE); 312 attribs.push_back(NONE);
313 313
314 // Create a proxy to a command buffer in the GPU process. 314 // Create a proxy to a command buffer in the GPU process.
315 if (onscreen) { 315 if (onscreen) {
316 command_buffer_ = host_->CreateViewCommandBuffer( 316 command_buffer_ = host_->CreateViewCommandBuffer(
317 surface_id_, 317 surface_id_,
318 share_group, 318 share_group,
319 allowed_extensions, 319 allowed_extensions,
320 attribs, 320 attribs,
321 active_url_, 321 active_url_,
322 attributes_.useVirtualContext,
322 gpu_preference_); 323 gpu_preference_);
323 } else { 324 } else {
324 command_buffer_ = host_->CreateOffscreenCommandBuffer( 325 command_buffer_ = host_->CreateOffscreenCommandBuffer(
325 gfx::Size(1, 1), 326 gfx::Size(1, 1),
326 share_group, 327 share_group,
327 allowed_extensions, 328 allowed_extensions,
328 attribs, 329 attribs,
329 active_url_, 330 active_url_,
331 attributes_.useVirtualContext,
330 gpu_preference_); 332 gpu_preference_);
331 } 333 }
332 334
333 if (!command_buffer_) 335 if (!command_buffer_)
334 return false; 336 return false;
335 337
336 // Initialize the command buffer. 338 // Initialize the command buffer.
337 return command_buffer_->Initialize(); 339 return command_buffer_->Initialize();
338 } 340 }
339 341
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 1746
1745 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1747 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1746 const std::string& message, int id) { 1748 const std::string& message, int id) {
1747 if (error_message_callback_) { 1749 if (error_message_callback_) {
1748 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1750 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1749 error_message_callback_->onErrorMessage(str, id); 1751 error_message_callback_->onErrorMessage(str, id);
1750 } 1752 }
1751 } 1753 }
1752 1754
1753 } // namespace content 1755 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698