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