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

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

Issue 1218783003: Revert of Revert of content: Fix single process support for native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/in_process_gpu_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
372 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = 368 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory =
373 GpuMemoryBufferFactory::Create(supported_types[0]); 369 GpuMemoryBufferFactory::Create(
370 GpuChildThread::GetGpuMemoryBufferFactoryType());
374 371
375 GpuProcess gpu_process; 372 GpuProcess gpu_process;
376 373
377 GpuChildThread* child_thread = new GpuChildThread( 374 GpuChildThread* child_thread = new GpuChildThread(
378 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), 375 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(),
379 gpu_memory_buffer_factory.get()); 376 gpu_memory_buffer_factory.get());
380 while (!deferred_messages.Get().empty()) 377 while (!deferred_messages.Get().empty())
381 deferred_messages.Get().pop(); 378 deferred_messages.Get().pop();
382 379
383 child_thread->Init(start_time); 380 child_thread->Init(start_time);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 return true; 557 return true;
561 } 558 }
562 559
563 return false; 560 return false;
564 } 561 }
565 #endif // defined(OS_WIN) 562 #endif // defined(OS_WIN)
566 563
567 } // namespace. 564 } // namespace.
568 565
569 } // namespace content 566 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/gpu/in_process_gpu_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698