OLD | NEW |
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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/i18n/icu_util.h" | 7 #include "base/i18n/icu_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 gfx::GLSurface::InitializeOneOff(); | 114 gfx::GLSurface::InitializeOneOff(); |
115 | 115 |
116 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
117 gfx::InitDeviceScaleFactor(1.0f); | 117 gfx::InitDeviceScaleFactor(1.0f); |
118 #endif | 118 #endif |
119 | 119 |
120 // The ContextFactory must exist before any Compositors are created. | 120 // The ContextFactory must exist before any Compositors are created. |
121 bool context_factory_for_test = false; | 121 bool context_factory_for_test = false; |
122 scoped_ptr<ui::InProcessContextFactory> context_factory( | 122 scoped_ptr<ui::InProcessContextFactory> context_factory( |
123 new ui::InProcessContextFactory(context_factory_for_test)); | 123 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); |
124 context_factory->set_use_test_surface(false); | 124 context_factory->set_use_test_surface(false); |
125 | 125 |
126 // Create the message-loop here before creating the root window. | 126 // Create the message-loop here before creating the root window. |
127 base::MessageLoopForUI message_loop; | 127 base::MessageLoopForUI message_loop; |
128 | 128 |
129 aura::Env::CreateInstance(true); | 129 aura::Env::CreateInstance(true); |
130 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 130 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
131 scoped_ptr<aura::TestScreen> test_screen( | 131 scoped_ptr<aura::TestScreen> test_screen( |
132 aura::TestScreen::Create(gfx::Size())); | 132 aura::TestScreen::Create(gfx::Size())); |
133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 int main(int argc, char** argv) { | 174 int main(int argc, char** argv) { |
175 base::CommandLine::Init(argc, argv); | 175 base::CommandLine::Init(argc, argv); |
176 | 176 |
177 // The exit manager is in charge of calling the dtors of singleton objects. | 177 // The exit manager is in charge of calling the dtors of singleton objects. |
178 base::AtExitManager exit_manager; | 178 base::AtExitManager exit_manager; |
179 | 179 |
180 base::i18n::InitializeICU(); | 180 base::i18n::InitializeICU(); |
181 | 181 |
182 return DemoMain(); | 182 return DemoMain(); |
183 } | 183 } |
OLD | NEW |