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

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: android-build-and-earlyout-sooner 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
« no previous file with comments | « ui/aura/demo/DEPS ('k') | ui/compositor/compositor.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 <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 "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "cc/surfaces/surface_manager.h"
17 #include "third_party/skia/include/core/SkXfermode.h" 18 #include "third_party/skia/include/core/SkXfermode.h"
18 #include "ui/aura/client/default_capture_client.h" 19 #include "ui/aura/client/default_capture_client.h"
19 #include "ui/aura/client/window_tree_client.h" 20 #include "ui/aura/client/window_tree_client.h"
20 #include "ui/aura/env.h" 21 #include "ui/aura/env.h"
21 #include "ui/aura/test/test_focus_client.h" 22 #include "ui/aura/test/test_focus_client.h"
22 #include "ui/aura/test/test_screen.h" 23 #include "ui/aura/test/test_screen.h"
23 #include "ui/aura/window.h" 24 #include "ui/aura/window.h"
24 #include "ui/aura/window_delegate.h" 25 #include "ui/aura/window_delegate.h"
25 #include "ui/aura/window_tree_host.h" 26 #include "ui/aura/window_tree_host.h"
26 #include "ui/base/hit_test.h" 27 #include "ui/base/hit_test.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 #endif 133 #endif
133 134
134 gl::init::InitializeGLOneOff(); 135 gl::init::InitializeGLOneOff();
135 136
136 #if defined(OS_WIN) 137 #if defined(OS_WIN)
137 display::win::SetDefaultDeviceScaleFactor(1.0f); 138 display::win::SetDefaultDeviceScaleFactor(1.0f);
138 #endif 139 #endif
139 140
140 // The ContextFactory must exist before any Compositors are created. 141 // The ContextFactory must exist before any Compositors are created.
141 bool context_factory_for_test = false; 142 bool context_factory_for_test = false;
143 cc::SurfaceManager surface_manager;
142 std::unique_ptr<ui::InProcessContextFactory> context_factory( 144 std::unique_ptr<ui::InProcessContextFactory> context_factory(
143 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); 145 new ui::InProcessContextFactory(context_factory_for_test,
146 &surface_manager));
144 context_factory->set_use_test_surface(false); 147 context_factory->set_use_test_surface(false);
145 148
146 // Create the message-loop here before creating the root window. 149 // Create the message-loop here before creating the root window.
147 base::MessageLoopForUI message_loop; 150 base::MessageLoopForUI message_loop;
148 151
149 base::PowerMonitor power_monitor( 152 base::PowerMonitor power_monitor(
150 base::WrapUnique(new base::PowerMonitorDeviceSource)); 153 base::WrapUnique(new base::PowerMonitorDeviceSource));
151 154
152 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); 155 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance();
153 env->set_context_factory(context_factory.get()); 156 env->set_context_factory(context_factory.get());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int main(int argc, char** argv) { 203 int main(int argc, char** argv) {
201 base::CommandLine::Init(argc, argv); 204 base::CommandLine::Init(argc, argv);
202 205
203 // The exit manager is in charge of calling the dtors of singleton objects. 206 // The exit manager is in charge of calling the dtors of singleton objects.
204 base::AtExitManager exit_manager; 207 base::AtExitManager exit_manager;
205 208
206 base::i18n::InitializeICU(); 209 base::i18n::InitializeICU();
207 210
208 return DemoMain(); 211 return DemoMain();
209 } 212 }
OLDNEW
« no previous file with comments | « ui/aura/demo/DEPS ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698