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

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

Issue 1908223002: Remove content/gpu from content/browser/android/DEPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owned_sync_point_manager_ Created 4 years, 8 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "content/common/content_constants_internal.h" 23 #include "content/common/content_constants_internal.h"
24 #include "content/common/gpu_host_messages.h" 24 #include "content/common/gpu_host_messages.h"
25 #include "content/common/sandbox_linux/sandbox_linux.h" 25 #include "content/common/sandbox_linux/sandbox_linux.h"
26 #include "content/gpu/gpu_child_thread.h" 26 #include "content/gpu/gpu_child_thread.h"
27 #include "content/gpu/gpu_process.h" 27 #include "content/gpu/gpu_process.h"
28 #include "content/gpu/gpu_watchdog_thread.h" 28 #include "content/gpu/gpu_watchdog_thread.h"
29 #include "content/public/common/content_client.h" 29 #include "content/public/common/content_client.h"
30 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
31 #include "content/public/common/main_function_params.h" 31 #include "content/public/common/main_function_params.h"
32 #include "gpu/command_buffer/service/gpu_switches.h" 32 #include "gpu/command_buffer/service/gpu_switches.h"
33 #include "gpu/command_buffer/service/sync_point_manager.h"
34 #include "gpu/config/gpu_info_collector.h" 33 #include "gpu/config/gpu_info_collector.h"
35 #include "gpu/config/gpu_switches.h" 34 #include "gpu/config/gpu_switches.h"
36 #include "gpu/config/gpu_util.h" 35 #include "gpu/config/gpu_util.h"
37 #include "gpu/ipc/common/gpu_memory_buffer_support.h" 36 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
38 #include "gpu/ipc/service/gpu_config.h" 37 #include "gpu/ipc/service/gpu_config.h"
39 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" 38 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
40 #include "ui/events/platform/platform_event_source.h" 39 #include "ui/events/platform/platform_event_source.h"
41 #include "ui/gl/gl_context.h" 40 #include "ui/gl/gl_context.h"
42 #include "ui/gl/gl_implementation.h" 41 #include "ui/gl/gl_implementation.h"
43 #include "ui/gl/gl_surface.h" 42 #include "ui/gl/gl_surface.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } else { 376 } else {
378 dead_on_arrival = true; 377 dead_on_arrival = true;
379 } 378 }
380 379
381 logging::SetLogMessageHandler(NULL); 380 logging::SetLogMessageHandler(NULL);
382 381
383 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory; 382 std::unique_ptr<gpu::GpuMemoryBufferFactory> gpu_memory_buffer_factory;
384 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) 383 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER)
385 gpu_memory_buffer_factory = gpu::GpuMemoryBufferFactory::CreateNativeType(); 384 gpu_memory_buffer_factory = gpu::GpuMemoryBufferFactory::CreateNativeType();
386 385
387 gpu::SyncPointManager sync_point_manager(false);
388
389 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; 386 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
390 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) 387 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
391 io_thread_priority = base::ThreadPriority::DISPLAY; 388 io_thread_priority = base::ThreadPriority::DISPLAY;
392 #endif 389 #endif
393 390
394 GpuProcess gpu_process(io_thread_priority); 391 GpuProcess gpu_process(io_thread_priority);
395 392
396 GpuChildThread* child_thread = new GpuChildThread( 393 GpuChildThread* child_thread = new GpuChildThread(
397 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), 394 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(),
398 gpu_memory_buffer_factory.get(), 395 gpu_memory_buffer_factory.get());
399 &sync_point_manager);
400 while (!deferred_messages.Get().empty()) 396 while (!deferred_messages.Get().empty())
401 deferred_messages.Get().pop(); 397 deferred_messages.Get().pop();
402 398
403 child_thread->Init(start_time); 399 child_thread->Init(start_time);
404 400
405 gpu_process.set_main_thread(child_thread); 401 gpu_process.set_main_thread(child_thread);
406 402
407 if (watchdog_thread.get()) 403 if (watchdog_thread.get())
408 watchdog_thread->AddPowerObserver(); 404 watchdog_thread->AddPowerObserver();
409 405
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 return true; 581 return true;
586 } 582 }
587 583
588 return false; 584 return false;
589 } 585 }
590 #endif // defined(OS_WIN) 586 #endif // defined(OS_WIN)
591 587
592 } // namespace. 588 } // namespace.
593 589
594 } // namespace content 590 } // 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