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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 gpu_info.video_decode_accelerator_supported_profiles = | 358 gpu_info.video_decode_accelerator_supported_profiles = |
359 content::GpuVideoDecodeAccelerator::GetSupportedProfiles(); | 359 content::GpuVideoDecodeAccelerator::GetSupportedProfiles(); |
360 gpu_info.video_encode_accelerator_supported_profiles = | 360 gpu_info.video_encode_accelerator_supported_profiles = |
361 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); | 361 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); |
362 } else { | 362 } else { |
363 dead_on_arrival = true; | 363 dead_on_arrival = true; |
364 } | 364 } |
365 | 365 |
366 logging::SetLogMessageHandler(NULL); | 366 logging::SetLogMessageHandler(NULL); |
367 | 367 |
| 368 std::vector<gfx::GpuMemoryBufferType> supported_types; |
| 369 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); |
| 370 DCHECK(!supported_types.empty()); |
| 371 // Note: We always use the preferred type. |
368 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = | 372 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = |
369 GpuMemoryBufferFactory::Create( | 373 GpuMemoryBufferFactory::Create(supported_types[0]); |
370 GpuChildThread::GetGpuMemoryBufferFactoryType()); | |
371 | 374 |
372 GpuProcess gpu_process; | 375 GpuProcess gpu_process; |
373 | 376 |
374 GpuChildThread* child_thread = new GpuChildThread( | 377 GpuChildThread* child_thread = new GpuChildThread( |
375 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), | 378 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), |
376 gpu_memory_buffer_factory.get()); | 379 gpu_memory_buffer_factory.get()); |
377 while (!deferred_messages.Get().empty()) | 380 while (!deferred_messages.Get().empty()) |
378 deferred_messages.Get().pop(); | 381 deferred_messages.Get().pop(); |
379 | 382 |
380 child_thread->Init(start_time); | 383 child_thread->Init(start_time); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 return true; | 560 return true; |
558 } | 561 } |
559 | 562 |
560 return false; | 563 return false; |
561 } | 564 } |
562 #endif // defined(OS_WIN) | 565 #endif // defined(OS_WIN) |
563 | 566 |
564 } // namespace. | 567 } // namespace. |
565 | 568 |
566 } // namespace content | 569 } // namespace content |
OLD | NEW |