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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 470 |
471 if (command_buffer_) { | 471 if (command_buffer_) { |
472 if (host_.get()) | 472 if (host_.get()) |
473 host_->DestroyCommandBuffer(command_buffer_.release()); | 473 host_->DestroyCommandBuffer(command_buffer_.release()); |
474 command_buffer_.reset(); | 474 command_buffer_.reset(); |
475 } | 475 } |
476 | 476 |
477 host_ = NULL; | 477 host_ = NULL; |
478 } | 478 } |
479 | 479 |
480 // TODO(apatrick,piman): This should be renamed to something clearer. | |
481 int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() { | |
482 return host_.get() ? host_->gpu_host_id() : 0; | |
483 } | |
484 | |
485 gpu::ContextSupport* | 480 gpu::ContextSupport* |
486 WebGraphicsContext3DCommandBufferImpl::GetContextSupport() { | 481 WebGraphicsContext3DCommandBufferImpl::GetContextSupport() { |
487 return real_gl_.get(); | 482 return real_gl_.get(); |
488 } | 483 } |
489 | 484 |
490 void WebGraphicsContext3DCommandBufferImpl::prepareTexture() { | 485 void WebGraphicsContext3DCommandBufferImpl::prepareTexture() { |
491 NOTREACHED(); | 486 NOTREACHED(); |
492 } | 487 } |
493 | 488 |
494 void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM( | 489 void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM( |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 | 1364 |
1370 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1365 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1371 const std::string& message, int id) { | 1366 const std::string& message, int id) { |
1372 if (error_message_callback_) { | 1367 if (error_message_callback_) { |
1373 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); | 1368 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); |
1374 error_message_callback_->onErrorMessage(str, id); | 1369 error_message_callback_->onErrorMessage(str, id); |
1375 } | 1370 } |
1376 } | 1371 } |
1377 | 1372 |
1378 } // namespace content | 1373 } // namespace content |
OLD | NEW |