OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
8 #include "ui/events/devices/device_data_manager.h" | 8 #include "ui/events/devices/device_data_manager.h" |
9 #include "ui/ozone/platform_object.h" | 9 #include "ui/ozone/platform_object.h" |
10 #include "ui/ozone/platform_selection.h" | 10 #include "ui/ozone/platform_selection.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 if (g_platform_initialized_ui) | 44 if (g_platform_initialized_ui) |
45 return; | 45 return; |
46 g_platform_initialized_ui = true; | 46 g_platform_initialized_ui = true; |
47 instance_->InitializeUI(args); | 47 instance_->InitializeUI(args); |
48 // This is deliberately created after initializing so that the platform can | 48 // This is deliberately created after initializing so that the platform can |
49 // create its own version of DDM. | 49 // create its own version of DDM. |
50 DeviceDataManager::CreateInstance(); | 50 DeviceDataManager::CreateInstance(); |
51 } | 51 } |
52 | 52 |
53 // static | 53 // static |
54 void OzonePlatform::InitializeForGPU() { | |
55 const InitParams params; | |
56 OzonePlatform::InitializeForGPU(params); | |
57 } | |
58 | |
59 // static | |
60 void OzonePlatform::InitializeForGPU(const InitParams& args) { | 54 void OzonePlatform::InitializeForGPU(const InitParams& args) { |
61 EnsureInstance(); | 55 EnsureInstance(); |
62 if (g_platform_initialized_gpu) | 56 if (g_platform_initialized_gpu) |
63 return; | 57 return; |
64 g_platform_initialized_gpu = true; | 58 g_platform_initialized_gpu = true; |
65 instance_->InitializeGPU(args); | 59 instance_->InitializeGPU(args); |
66 } | 60 } |
67 | 61 |
68 // static | 62 // static |
69 OzonePlatform* OzonePlatform::GetInstance() { | 63 OzonePlatform* OzonePlatform::GetInstance() { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 99 } |
106 | 100 |
107 base::MessageLoop::Type OzonePlatform::GetMessageLoopTypeForGpu() { | 101 base::MessageLoop::Type OzonePlatform::GetMessageLoopTypeForGpu() { |
108 return base::MessageLoop::TYPE_DEFAULT; | 102 return base::MessageLoop::TYPE_DEFAULT; |
109 } | 103 } |
110 | 104 |
111 void OzonePlatform::AddInterfaces( | 105 void OzonePlatform::AddInterfaces( |
112 service_manager::InterfaceRegistry* registry) {} | 106 service_manager::InterfaceRegistry* registry) {} |
113 | 107 |
114 } // namespace ui | 108 } // namespace ui |
OLD | NEW |