| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 software_(software), | 410 software_(software), |
| 411 handle_messages_scheduled_(false), | 411 handle_messages_scheduled_(false), |
| 412 currently_processing_message_(NULL), | 412 currently_processing_message_(NULL), |
| 413 weak_factory_(this), | 413 weak_factory_(this), |
| 414 num_stubs_descheduled_(0), | 414 num_stubs_descheduled_(0), |
| 415 allow_future_sync_points_(allow_future_sync_points) { | 415 allow_future_sync_points_(allow_future_sync_points) { |
| 416 DCHECK(gpu_channel_manager); | 416 DCHECK(gpu_channel_manager); |
| 417 DCHECK(client_id); | 417 DCHECK(client_id); |
| 418 | 418 |
| 419 channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu"); | 419 channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu"); |
| 420 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 420 const base::CommandLine* command_line = |
| 421 base::CommandLine::ForCurrentProcess(); |
| 421 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); | 422 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); |
| 422 } | 423 } |
| 423 | 424 |
| 424 GpuChannel::~GpuChannel() { | 425 GpuChannel::~GpuChannel() { |
| 425 STLDeleteElements(&deferred_messages_); | 426 STLDeleteElements(&deferred_messages_); |
| 426 if (preempting_flag_.get()) | 427 if (preempting_flag_.get()) |
| 427 preempting_flag_->Reset(); | 428 preempting_flag_->Reset(); |
| 428 } | 429 } |
| 429 | 430 |
| 430 void GpuChannel::Init(base::MessageLoopProxy* io_message_loop, | 431 void GpuChannel::Init(base::MessageLoopProxy* io_message_loop, |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 uint64 GpuChannel::GetMemoryUsage() { | 824 uint64 GpuChannel::GetMemoryUsage() { |
| 824 uint64 size = 0; | 825 uint64 size = 0; |
| 825 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); | 826 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); |
| 826 !it.IsAtEnd(); it.Advance()) { | 827 !it.IsAtEnd(); it.Advance()) { |
| 827 size += it.GetCurrentValue()->GetMemoryUsage(); | 828 size += it.GetCurrentValue()->GetMemoryUsage(); |
| 828 } | 829 } |
| 829 return size; | 830 return size; |
| 830 } | 831 } |
| 831 | 832 |
| 832 } // namespace content | 833 } // namespace content |
| OLD | NEW |