| 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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
| 10 | 10 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 GpuChannel::~GpuChannel() { | 456 GpuChannel::~GpuChannel() { |
| 457 // Clear stubs first because of dependencies. | 457 // Clear stubs first because of dependencies. |
| 458 stubs_.clear(); | 458 stubs_.clear(); |
| 459 | 459 |
| 460 STLDeleteElements(&deferred_messages_); | 460 STLDeleteElements(&deferred_messages_); |
| 461 subscription_ref_set_->RemoveObserver(this); | 461 subscription_ref_set_->RemoveObserver(this); |
| 462 if (preempting_flag_.get()) | 462 if (preempting_flag_.get()) |
| 463 preempting_flag_->Reset(); | 463 preempting_flag_->Reset(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 IPC::ChannelHandle GpuChannel::Init(base::WaitableEvent* shutdown_event, | 466 IPC::ChannelHandle GpuChannel::Init(base::WaitableEvent* shutdown_event) { |
| 467 IPC::AttachmentBroker* attachment_broker) { | |
| 468 DCHECK(shutdown_event); | 467 DCHECK(shutdown_event); |
| 469 DCHECK(!channel_); | 468 DCHECK(!channel_); |
| 470 | 469 |
| 471 IPC::ChannelHandle channel_handle(channel_id_); | 470 IPC::ChannelHandle channel_handle(channel_id_); |
| 472 | 471 |
| 473 channel_ = IPC::SyncChannel::Create(channel_handle, IPC::Channel::MODE_SERVER, | 472 channel_ = |
| 474 this, io_task_runner_, false, | 473 IPC::SyncChannel::Create(channel_handle, IPC::Channel::MODE_SERVER, this, |
| 475 shutdown_event, attachment_broker); | 474 io_task_runner_, false, shutdown_event); |
| 476 | 475 |
| 477 #if defined(OS_POSIX) | 476 #if defined(OS_POSIX) |
| 478 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so | 477 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so |
| 479 // that it gets closed after it has been sent. | 478 // that it gets closed after it has been sent. |
| 480 base::ScopedFD renderer_fd = channel_->TakeClientFileDescriptor(); | 479 base::ScopedFD renderer_fd = channel_->TakeClientFileDescriptor(); |
| 481 DCHECK(renderer_fd.is_valid()); | 480 DCHECK(renderer_fd.is_valid()); |
| 482 channel_handle.socket = base::FileDescriptor(renderer_fd.Pass()); | 481 channel_handle.socket = base::FileDescriptor(renderer_fd.Pass()); |
| 483 #endif | 482 #endif |
| 484 | 483 |
| 485 channel_->AddFilter(filter_.get()); | 484 channel_->AddFilter(filter_.get()); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 } | 880 } |
| 882 } | 881 } |
| 883 } | 882 } |
| 884 | 883 |
| 885 void GpuChannel::HandleUpdateValueState( | 884 void GpuChannel::HandleUpdateValueState( |
| 886 unsigned int target, const gpu::ValueState& state) { | 885 unsigned int target, const gpu::ValueState& state) { |
| 887 pending_valuebuffer_state_->UpdateState(target, state); | 886 pending_valuebuffer_state_->UpdateState(target, state); |
| 888 } | 887 } |
| 889 | 888 |
| 890 } // namespace content | 889 } // namespace content |
| OLD | NEW |