OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/proxy/ppb_context_3d_proxy.h" | 5 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
6 | 6 |
7 #include "base/hash_tables.h" | 7 #include "base/hash_tables.h" |
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 return true; | 388 return true; |
389 | 389 |
390 last_state_.error = gpu::error::kLostContext; | 390 last_state_.error = gpu::error::kLostContext; |
391 return false; | 391 return false; |
392 } | 392 } |
393 | 393 |
394 Context3D::Context3D(const HostResource& resource) | 394 Context3D::Context3D(const HostResource& resource) |
395 : PluginResource(resource), | 395 : PluginResource(resource), |
396 draw_(NULL), | 396 draw_(NULL), |
397 read_(NULL), | 397 read_(NULL), |
398 transfer_buffer_id_(NULL) { | 398 transfer_buffer_id_(0) { |
399 } | 399 } |
400 | 400 |
401 Context3D::~Context3D() { | 401 Context3D::~Context3D() { |
402 if (draw_) | 402 if (draw_) |
403 draw_->set_context(NULL); | 403 draw_->set_context(NULL); |
404 } | 404 } |
405 | 405 |
406 bool Context3D::CreateImplementation() { | 406 bool Context3D::CreateImplementation() { |
407 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance()); | 407 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance()); |
408 if (!dispatcher) | 408 if (!dispatcher) |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 &shm_handle, | 600 &shm_handle, |
601 &shm_size)) { | 601 &shm_size)) { |
602 return; | 602 return; |
603 } | 603 } |
604 *transfer_buffer = TransportSHMHandleFromInt(dispatcher(), shm_handle); | 604 *transfer_buffer = TransportSHMHandleFromInt(dispatcher(), shm_handle); |
605 *size = shm_size; | 605 *size = shm_size; |
606 } | 606 } |
607 | 607 |
608 } // namespace proxy | 608 } // namespace proxy |
609 } // namespace pp | 609 } // namespace pp |
OLD | NEW |