| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool future_sync_points) | 76 bool future_sync_points) |
| 77 : preemption_state_(IDLE), | 77 : preemption_state_(IDLE), |
| 78 gpu_channel_(gpu_channel), | 78 gpu_channel_(gpu_channel), |
| 79 sender_(NULL), | 79 sender_(NULL), |
| 80 sync_point_manager_(sync_point_manager), | 80 sync_point_manager_(sync_point_manager), |
| 81 message_loop_(message_loop), | 81 message_loop_(message_loop), |
| 82 messages_forwarded_to_channel_(0), | 82 messages_forwarded_to_channel_(0), |
| 83 a_stub_is_descheduled_(false), | 83 a_stub_is_descheduled_(false), |
| 84 future_sync_points_(future_sync_points) {} | 84 future_sync_points_(future_sync_points) {} |
| 85 | 85 |
| 86 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE { | 86 virtual void OnFilterAdded(IPC::Sender* sender) override { |
| 87 DCHECK(!sender_); | 87 DCHECK(!sender_); |
| 88 sender_ = sender; | 88 sender_ = sender; |
| 89 } | 89 } |
| 90 | 90 |
| 91 virtual void OnFilterRemoved() OVERRIDE { | 91 virtual void OnFilterRemoved() override { |
| 92 DCHECK(sender_); | 92 DCHECK(sender_); |
| 93 sender_ = NULL; | 93 sender_ = NULL; |
| 94 } | 94 } |
| 95 | 95 |
| 96 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { | 96 virtual bool OnMessageReceived(const IPC::Message& message) override { |
| 97 DCHECK(sender_); | 97 DCHECK(sender_); |
| 98 | 98 |
| 99 bool handled = false; | 99 bool handled = false; |
| 100 if ((message.type() == GpuCommandBufferMsg_RetireSyncPoint::ID) && | 100 if ((message.type() == GpuCommandBufferMsg_RetireSyncPoint::ID) && |
| 101 !future_sync_points_) { | 101 !future_sync_points_) { |
| 102 DLOG(ERROR) << "Untrusted client should not send " | 102 DLOG(ERROR) << "Untrusted client should not send " |
| 103 "GpuCommandBufferMsg_RetireSyncPoint message"; | 103 "GpuCommandBufferMsg_RetireSyncPoint message"; |
| 104 return true; | 104 return true; |
| 105 } | 105 } |
| 106 | 106 |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 uint64 GpuChannel::GetMemoryUsage() { | 812 uint64 GpuChannel::GetMemoryUsage() { |
| 813 uint64 size = 0; | 813 uint64 size = 0; |
| 814 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); | 814 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); |
| 815 !it.IsAtEnd(); it.Advance()) { | 815 !it.IsAtEnd(); it.Advance()) { |
| 816 size += it.GetCurrentValue()->GetMemoryUsage(); | 816 size += it.GetCurrentValue()->GetMemoryUsage(); |
| 817 } | 817 } |
| 818 return size; | 818 return size; |
| 819 } | 819 } |
| 820 | 820 |
| 821 } // namespace content | 821 } // namespace content |
| OLD | NEW |