Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 1389133002: content: Use type-parameterized tests for GpuMemoryBuffer implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 gpu_info.video_encode_accelerator_supported_profiles = 354 gpu_info.video_encode_accelerator_supported_profiles =
355 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); 355 content::GpuVideoEncodeAccelerator::GetSupportedProfiles();
356 gpu_info.jpeg_decode_accelerator_supported = 356 gpu_info.jpeg_decode_accelerator_supported =
357 content::GpuJpegDecodeAccelerator::IsSupported(); 357 content::GpuJpegDecodeAccelerator::IsSupported();
358 } else { 358 } else {
359 dead_on_arrival = true; 359 dead_on_arrival = true;
360 } 360 }
361 361
362 logging::SetLogMessageHandler(NULL); 362 logging::SetLogMessageHandler(NULL);
363 363
364 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = 364 gfx::GpuMemoryBufferType native_gpu_memory_buffer_factory_type =
365 GpuMemoryBufferFactory::Create( 365 GpuMemoryBufferFactory::GetNativeType();
366 GpuChildThread::GetGpuMemoryBufferFactoryType()); 366 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory;
367 if (native_gpu_memory_buffer_factory_type != gfx::EMPTY_BUFFER) {
368 gpu_memory_buffer_factory =
369 GpuMemoryBufferFactory::Create(native_gpu_memory_buffer_factory_type);
370 }
367 gpu::SyncPointManager sync_point_manager(false); 371 gpu::SyncPointManager sync_point_manager(false);
368 372
369 GpuProcess gpu_process; 373 GpuProcess gpu_process;
370 374
371 GpuChildThread* child_thread = new GpuChildThread( 375 GpuChildThread* child_thread = new GpuChildThread(
372 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), 376 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(),
373 gpu_memory_buffer_factory.get(), 377 gpu_memory_buffer_factory.get(),
374 &sync_point_manager); 378 &sync_point_manager);
375 while (!deferred_messages.Get().empty()) 379 while (!deferred_messages.Get().empty())
376 deferred_messages.Get().pop(); 380 deferred_messages.Get().pop();
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return true; 552 return true;
549 } 553 }
550 554
551 return false; 555 return false;
552 } 556 }
553 #endif // defined(OS_WIN) 557 #endif // defined(OS_WIN)
554 558
555 } // namespace. 559 } // namespace.
556 560
557 } // namespace content 561 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698