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 #include "content/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/threading/worker_pool.h" | 9 #include "base/threading/worker_pool.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 IPC_END_MESSAGE_MAP() | 73 IPC_END_MESSAGE_MAP() |
74 return handled; | 74 return handled; |
75 } | 75 } |
76 | 76 |
77 protected: | 77 protected: |
78 ~GpuMemoryBufferMessageFilter() override {} | 78 ~GpuMemoryBufferMessageFilter() override {} |
79 | 79 |
80 void OnCreateGpuMemoryBuffer( | 80 void OnCreateGpuMemoryBuffer( |
81 const GpuMsg_CreateGpuMemoryBuffer_Params& params) { | 81 const GpuMsg_CreateGpuMemoryBuffer_Params& params) { |
82 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer", | 82 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer", |
83 "id", params.id, "client_id", params.client_id); | 83 "id", params.id.id, "client_id", params.client_id); |
84 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated( | 84 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated( |
85 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( | 85 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( |
86 params.id, params.size, params.format, params.usage, | 86 params.id, params.size, params.format, params.usage, |
87 params.client_id, params.surface_handle))); | 87 params.client_id, params.surface_handle))); |
88 } | 88 } |
89 | 89 |
90 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; | 90 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; |
91 IPC::Sender* sender_; | 91 IPC::Sender* sender_; |
92 }; | 92 }; |
93 | 93 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 void GpuChildThread::OnGpuSwitched() { | 354 void GpuChildThread::OnGpuSwitched() { |
355 DVLOG(1) << "GPU: GPU has switched"; | 355 DVLOG(1) << "GPU: GPU has switched"; |
356 // Notify observers in the GPU process. | 356 // Notify observers in the GPU process. |
357 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); | 357 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); |
358 } | 358 } |
359 | 359 |
360 } // namespace content | 360 } // namespace content |
361 | |
OLD | NEW |