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

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

Issue 9958034: Convert plugin and GPU process to brokered handle duplication. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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.h » ('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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 gles2_helper_ = NULL; 476 gles2_helper_ = NULL;
477 477
478 if (host_ && command_buffer_) { 478 if (host_ && command_buffer_) {
479 host_->DestroyCommandBuffer(command_buffer_); 479 host_->DestroyCommandBuffer(command_buffer_);
480 command_buffer_ = NULL; 480 command_buffer_ = NULL;
481 } 481 }
482 482
483 host_ = NULL; 483 host_ = NULL;
484 } 484 }
485 485
486 // TODO(apatrick,piman): This should be renamed to something clearer.
486 int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() { 487 int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() {
487 return host_ ? host_->gpu_process_id() : 0; 488 return host_ ? host_->gpu_host_id() : 0;
488 } 489 }
489 490
490 int WebGraphicsContext3DCommandBufferImpl::GetChannelID() { 491 int WebGraphicsContext3DCommandBufferImpl::GetChannelID() {
491 return host_ ? host_->client_id() : 0; 492 return host_ ? host_->client_id() : 0;
492 } 493 }
493 494
494 int WebGraphicsContext3DCommandBufferImpl::GetContextID() { 495 int WebGraphicsContext3DCommandBufferImpl::GetContextID() {
495 return command_buffer_->GetRouteID(); 496 return command_buffer_->GetRouteID();
496 } 497 }
497 498
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 } 1510 }
1510 1511
1511 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1512 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1512 const std::string& message, int id) { 1513 const std::string& message, int id) {
1513 if (error_message_callback_) { 1514 if (error_message_callback_) {
1514 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1515 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1515 error_message_callback_->onErrorMessage(str, id); 1516 error_message_callback_->onErrorMessage(str, id);
1516 } 1517 }
1517 } 1518 }
1518 1519
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698