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

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 2270573002: cc: Get rid of LayerTreeHost::output_surface_lost_ state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-caps
Patch Set: lth-outputsurface-lost: deps Created 4 years, 3 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
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 <memory> 5 #include <memory>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/power_monitor/power_monitor.h" 13 #include "base/power_monitor/power_monitor.h"
14 #include "base/power_monitor/power_monitor_device_source.h" 14 #include "base/power_monitor/power_monitor_device_source.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "cc/surfaces/surface_manager.h"
16 #include "third_party/skia/include/core/SkXfermode.h" 17 #include "third_party/skia/include/core/SkXfermode.h"
17 #include "ui/aura/client/default_capture_client.h" 18 #include "ui/aura/client/default_capture_client.h"
18 #include "ui/aura/client/window_tree_client.h" 19 #include "ui/aura/client/window_tree_client.h"
19 #include "ui/aura/env.h" 20 #include "ui/aura/env.h"
20 #include "ui/aura/test/test_focus_client.h" 21 #include "ui/aura/test/test_focus_client.h"
21 #include "ui/aura/test/test_screen.h" 22 #include "ui/aura/test/test_screen.h"
22 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
23 #include "ui/aura/window_delegate.h" 24 #include "ui/aura/window_delegate.h"
24 #include "ui/aura/window_tree_host.h" 25 #include "ui/aura/window_tree_host.h"
25 #include "ui/base/hit_test.h" 26 #include "ui/base/hit_test.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #endif 132 #endif
132 133
133 gl::init::InitializeGLOneOff(); 134 gl::init::InitializeGLOneOff();
134 135
135 #if defined(OS_WIN) 136 #if defined(OS_WIN)
136 display::win::SetDefaultDeviceScaleFactor(1.0f); 137 display::win::SetDefaultDeviceScaleFactor(1.0f);
137 #endif 138 #endif
138 139
139 // The ContextFactory must exist before any Compositors are created. 140 // The ContextFactory must exist before any Compositors are created.
140 bool context_factory_for_test = false; 141 bool context_factory_for_test = false;
142 cc::SurfaceManager surface_manager;
141 std::unique_ptr<ui::InProcessContextFactory> context_factory( 143 std::unique_ptr<ui::InProcessContextFactory> context_factory(
142 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); 144 new ui::InProcessContextFactory(context_factory_for_test,
145 &surface_manager));
143 context_factory->set_use_test_surface(false); 146 context_factory->set_use_test_surface(false);
144 147
145 // Create the message-loop here before creating the root window. 148 // Create the message-loop here before creating the root window.
146 base::MessageLoopForUI message_loop; 149 base::MessageLoopForUI message_loop;
147 150
148 base::PowerMonitor power_monitor( 151 base::PowerMonitor power_monitor(
149 base::WrapUnique(new base::PowerMonitorDeviceSource)); 152 base::WrapUnique(new base::PowerMonitorDeviceSource));
150 153
151 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); 154 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance();
152 env->set_context_factory(context_factory.get()); 155 env->set_context_factory(context_factory.get());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int main(int argc, char** argv) { 202 int main(int argc, char** argv) {
200 base::CommandLine::Init(argc, argv); 203 base::CommandLine::Init(argc, argv);
201 204
202 // The exit manager is in charge of calling the dtors of singleton objects. 205 // The exit manager is in charge of calling the dtors of singleton objects.
203 base::AtExitManager exit_manager; 206 base::AtExitManager exit_manager;
204 207
205 base::i18n::InitializeICU(); 208 base::i18n::InitializeICU();
206 209
207 return DemoMain(); 210 return DemoMain();
208 } 211 }
OLDNEW
« no previous file with comments | « ui/aura/demo/DEPS ('k') | ui/compositor/compositor.h » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698