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

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

Issue 1231263003: Share SyncPointManager between ipc and in-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove forward decl/includes 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 17 matching lines...) Expand all
28 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 28 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
29 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" 29 #include "content/common/gpu/media/gpu_video_encode_accelerator.h"
30 #include "content/common/sandbox_linux/sandbox_linux.h" 30 #include "content/common/sandbox_linux/sandbox_linux.h"
31 #include "content/gpu/gpu_child_thread.h" 31 #include "content/gpu/gpu_child_thread.h"
32 #include "content/gpu/gpu_process.h" 32 #include "content/gpu/gpu_process.h"
33 #include "content/gpu/gpu_watchdog_thread.h" 33 #include "content/gpu/gpu_watchdog_thread.h"
34 #include "content/public/common/content_client.h" 34 #include "content/public/common/content_client.h"
35 #include "content/public/common/content_switches.h" 35 #include "content/public/common/content_switches.h"
36 #include "content/public/common/main_function_params.h" 36 #include "content/public/common/main_function_params.h"
37 #include "gpu/command_buffer/service/gpu_switches.h" 37 #include "gpu/command_buffer/service/gpu_switches.h"
38 #include "gpu/command_buffer/service/sync_point_manager.h"
38 #include "gpu/config/gpu_info_collector.h" 39 #include "gpu/config/gpu_info_collector.h"
39 #include "gpu/config/gpu_switches.h" 40 #include "gpu/config/gpu_switches.h"
40 #include "gpu/config/gpu_util.h" 41 #include "gpu/config/gpu_util.h"
41 #include "ui/events/platform/platform_event_source.h" 42 #include "ui/events/platform/platform_event_source.h"
42 #include "ui/gl/gl_context.h" 43 #include "ui/gl/gl_context.h"
43 #include "ui/gl/gl_implementation.h" 44 #include "ui/gl/gl_implementation.h"
44 #include "ui/gl/gl_surface.h" 45 #include "ui/gl/gl_surface.h"
45 #include "ui/gl/gl_switches.h" 46 #include "ui/gl/gl_switches.h"
46 #include "ui/gl/gpu_switching_manager.h" 47 #include "ui/gl/gpu_switching_manager.h"
47 48
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); 349 content::GpuVideoEncodeAccelerator::GetSupportedProfiles();
349 } else { 350 } else {
350 dead_on_arrival = true; 351 dead_on_arrival = true;
351 } 352 }
352 353
353 logging::SetLogMessageHandler(NULL); 354 logging::SetLogMessageHandler(NULL);
354 355
355 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = 356 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory =
356 GpuMemoryBufferFactory::Create( 357 GpuMemoryBufferFactory::Create(
357 GpuChildThread::GetGpuMemoryBufferFactoryType()); 358 GpuChildThread::GetGpuMemoryBufferFactoryType());
359 gpu::SyncPointManager sync_point_manager(false);
358 360
359 GpuProcess gpu_process; 361 GpuProcess gpu_process;
360 362
361 GpuChildThread* child_thread = new GpuChildThread( 363 GpuChildThread* child_thread = new GpuChildThread(
362 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), 364 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(),
363 gpu_memory_buffer_factory.get()); 365 gpu_memory_buffer_factory.get(),
366 &sync_point_manager);
364 while (!deferred_messages.Get().empty()) 367 while (!deferred_messages.Get().empty())
365 deferred_messages.Get().pop(); 368 deferred_messages.Get().pop();
366 369
367 child_thread->Init(start_time); 370 child_thread->Init(start_time);
368 371
369 gpu_process.set_main_thread(child_thread); 372 gpu_process.set_main_thread(child_thread);
370 373
371 if (watchdog_thread.get()) 374 if (watchdog_thread.get())
372 watchdog_thread->AddPowerObserver(); 375 watchdog_thread->AddPowerObserver();
373 376
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 return true; 547 return true;
545 } 548 }
546 549
547 return false; 550 return false;
548 } 551 }
549 #endif // defined(OS_WIN) 552 #endif // defined(OS_WIN)
550 553
551 } // namespace. 554 } // namespace.
552 555
553 } // namespace content 556 } // 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