| OLD | NEW |
| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() { | 486 int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() { |
| 487 return host_ ? host_->gpu_process_id() : 0; | 487 return host_ ? host_->gpu_host_id() : 0; |
| 488 } | 488 } |
| 489 | 489 |
| 490 int WebGraphicsContext3DCommandBufferImpl::GetChannelID() { | 490 int WebGraphicsContext3DCommandBufferImpl::GetChannelID() { |
| 491 return host_ ? host_->client_id() : 0; | 491 return host_ ? host_->client_id() : 0; |
| 492 } | 492 } |
| 493 | 493 |
| 494 int WebGraphicsContext3DCommandBufferImpl::GetContextID() { | 494 int WebGraphicsContext3DCommandBufferImpl::GetContextID() { |
| 495 return command_buffer_->GetRouteID(); | 495 return command_buffer_->GetRouteID(); |
| 496 } | 496 } |
| 497 | 497 |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1511 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1512 const std::string& message, int id) { | 1512 const std::string& message, int id) { |
| 1513 if (error_message_callback_) { | 1513 if (error_message_callback_) { |
| 1514 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1514 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1515 error_message_callback_->onErrorMessage(str, id); | 1515 error_message_callback_->onErrorMessage(str, id); |
| 1516 } | 1516 } |
| 1517 } | 1517 } |
| 1518 | 1518 |
| OLD | NEW |