| 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/common/gpu/gpu_channel_manager.h" | 5 #include "content/common/gpu/gpu_channel_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 params.id, params.size, params.format, params.usage, | 74 params.id, params.size, params.format, params.usage, |
| 75 params.client_id, params.surface_handle))); | 75 params.client_id, params.surface_handle))); |
| 76 } | 76 } |
| 77 | 77 |
| 78 IPC::Sender* sender_; | 78 IPC::Sender* sender_; |
| 79 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; | 79 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 gfx::GpuMemoryBufferType GetGpuMemoryBufferFactoryType() { | 82 gfx::GpuMemoryBufferType GetGpuMemoryBufferFactoryType() { |
| 83 std::vector<gfx::GpuMemoryBufferType> supported_types; | 83 std::vector<gfx::GpuMemoryBufferType> supported_types; |
| 84 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); | 84 // TODO(reveman): No support for native PERSISTENT_MAP. crbug.com/489438 |
| 85 GpuMemoryBufferFactory::GetSupportedTypes(gfx::GpuMemoryBuffer::MAP, |
| 86 &supported_types); |
| 85 DCHECK(!supported_types.empty()); | 87 DCHECK(!supported_types.empty()); |
| 86 return supported_types[0]; | 88 return supported_types[0]; |
| 87 } | 89 } |
| 88 | 90 |
| 89 } // namespace | 91 } // namespace |
| 90 | 92 |
| 91 GpuChannelManager::GpuChannelManager( | 93 GpuChannelManager::GpuChannelManager( |
| 92 MessageRouter* router, | 94 MessageRouter* router, |
| 93 GpuWatchdog* watchdog, | 95 GpuWatchdog* watchdog, |
| 94 base::SingleThreadTaskRunner* io_task_runner, | 96 base::SingleThreadTaskRunner* io_task_runner, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 OnResourcesRelinquished(); | 367 OnResourcesRelinquished(); |
| 366 #endif | 368 #endif |
| 367 } | 369 } |
| 368 } | 370 } |
| 369 | 371 |
| 370 void GpuChannelManager::OnResourcesRelinquished() { | 372 void GpuChannelManager::OnResourcesRelinquished() { |
| 371 Send(new GpuHostMsg_ResourcesRelinquished()); | 373 Send(new GpuHostMsg_ResourcesRelinquished()); |
| 372 } | 374 } |
| 373 | 375 |
| 374 } // namespace content | 376 } // namespace content |
| OLD | NEW |