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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 years, 6 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
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.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 #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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } 430 }
431 431
432 GpuChannel::~GpuChannel() { 432 GpuChannel::~GpuChannel() {
433 STLDeleteElements(&deferred_messages_); 433 STLDeleteElements(&deferred_messages_);
434 subscription_ref_set_->RemoveObserver(this); 434 subscription_ref_set_->RemoveObserver(this);
435 if (preempting_flag_.get()) 435 if (preempting_flag_.get())
436 preempting_flag_->Reset(); 436 preempting_flag_->Reset();
437 } 437 }
438 438
439 void GpuChannel::Init(base::SingleThreadTaskRunner* io_task_runner, 439 void GpuChannel::Init(base::SingleThreadTaskRunner* io_task_runner,
440 base::WaitableEvent* shutdown_event) { 440 base::WaitableEvent* shutdown_event,
441 IPC::AttachmentBroker* broker) {
441 DCHECK(!channel_.get()); 442 DCHECK(!channel_.get());
442 443
443 // Map renderer ID to a (single) channel to that process. 444 // Map renderer ID to a (single) channel to that process.
444 channel_ = 445 channel_ =
445 IPC::SyncChannel::Create(channel_id_, IPC::Channel::MODE_SERVER, this, 446 IPC::SyncChannel::Create(channel_id_, IPC::Channel::MODE_SERVER, this,
446 io_task_runner, false, shutdown_event); 447 io_task_runner, false, shutdown_event, broker);
447 448
448 filter_ = new GpuChannelMessageFilter( 449 filter_ = new GpuChannelMessageFilter(
449 weak_factory_.GetWeakPtr(), gpu_channel_manager_->sync_point_manager(), 450 weak_factory_.GetWeakPtr(), gpu_channel_manager_->sync_point_manager(),
450 base::ThreadTaskRunnerHandle::Get(), allow_future_sync_points_); 451 base::ThreadTaskRunnerHandle::Get(), allow_future_sync_points_);
451 io_task_runner_ = io_task_runner; 452 io_task_runner_ = io_task_runner;
452 channel_->AddFilter(filter_.get()); 453 channel_->AddFilter(filter_.get());
453 pending_valuebuffer_state_ = new gpu::ValueStateMap(); 454 pending_valuebuffer_state_ = new gpu::ValueStateMap();
454 } 455 }
455 456
456 std::string GpuChannel::GetChannelName() { 457 std::string GpuChannel::GetChannelName() {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 849 }
849 } 850 }
850 } 851 }
851 852
852 void GpuChannel::HandleUpdateValueState( 853 void GpuChannel::HandleUpdateValueState(
853 unsigned int target, const gpu::ValueState& state) { 854 unsigned int target, const gpu::ValueState& state) {
854 pending_valuebuffer_state_->UpdateState(target, state); 855 pending_valuebuffer_state_->UpdateState(target, state);
855 } 856 }
856 857
857 } // namespace content 858 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698