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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 bool allow_future_sync_points) | 403 bool allow_future_sync_points) |
404 : gpu_channel_manager_(gpu_channel_manager), | 404 : gpu_channel_manager_(gpu_channel_manager), |
405 messages_processed_(0), | 405 messages_processed_(0), |
406 client_id_(client_id), | 406 client_id_(client_id), |
407 share_group_(share_group ? share_group : new gfx::GLShareGroup), | 407 share_group_(share_group ? share_group : new gfx::GLShareGroup), |
408 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager), | 408 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager), |
409 watchdog_(watchdog), | 409 watchdog_(watchdog), |
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), | |
414 num_stubs_descheduled_(0), | 413 num_stubs_descheduled_(0), |
415 allow_future_sync_points_(allow_future_sync_points) { | 414 allow_future_sync_points_(allow_future_sync_points), |
| 415 weak_factory_(this) { |
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 base::CommandLine* command_line = | 420 const base::CommandLine* command_line = |
421 base::CommandLine::ForCurrentProcess(); | 421 base::CommandLine::ForCurrentProcess(); |
422 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); | 422 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); |
423 } | 423 } |
424 | 424 |
425 GpuChannel::~GpuChannel() { | 425 GpuChannel::~GpuChannel() { |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 uint64 GpuChannel::GetMemoryUsage() { | 886 uint64 GpuChannel::GetMemoryUsage() { |
887 uint64 size = 0; | 887 uint64 size = 0; |
888 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); | 888 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); |
889 !it.IsAtEnd(); it.Advance()) { | 889 !it.IsAtEnd(); it.Advance()) { |
890 size += it.GetCurrentValue()->GetMemoryUsage(); | 890 size += it.GetCurrentValue()->GetMemoryUsage(); |
891 } | 891 } |
892 return size; | 892 return size; |
893 } | 893 } |
894 | 894 |
895 } // namespace content | 895 } // namespace content |
OLD | NEW |