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

Side by Side Diff: ui/views/examples/examples_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/views/examples/DEPS ('k') | ui/views/mus/surface_context_factory.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.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/path_service.h" 13 #include "base/path_service.h"
14 #include "base/power_monitor/power_monitor.h" 14 #include "base/power_monitor/power_monitor.h"
15 #include "base/power_monitor/power_monitor_device_source.h" 15 #include "base/power_monitor/power_monitor_device_source.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/test/test_discardable_memory_allocator.h" 17 #include "base/test/test_discardable_memory_allocator.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 #include "cc/surfaces/surface_manager.h"
19 #include "ui/base/ime/input_method_initializer.h" 20 #include "ui/base/ime/input_method_initializer.h"
20 #include "ui/base/material_design/material_design_controller.h" 21 #include "ui/base/material_design/material_design_controller.h"
21 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
22 #include "ui/base/ui_base_paths.h" 23 #include "ui/base/ui_base_paths.h"
23 #include "ui/compositor/test/in_process_context_factory.h" 24 #include "ui/compositor/test/in_process_context_factory.h"
24 #include "ui/display/screen.h" 25 #include "ui/display/screen.h"
25 #include "ui/gl/init/gl_factory.h" 26 #include "ui/gl/init/gl_factory.h"
26 #include "ui/views/examples/example_base.h" 27 #include "ui/views/examples/example_base.h"
27 #include "ui/views/examples/examples_window.h" 28 #include "ui/views/examples/examples_window.h"
28 #include "ui/views/test/desktop_test_views_delegate.h" 29 #include "ui/views/test/desktop_test_views_delegate.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #if defined(USE_X11) 61 #if defined(USE_X11)
61 // This demo uses InProcessContextFactory which uses X on a separate Gpu 62 // This demo uses InProcessContextFactory which uses X on a separate Gpu
62 // thread. 63 // thread.
63 gfx::InitializeThreadedX11(); 64 gfx::InitializeThreadedX11();
64 #endif 65 #endif
65 66
66 gl::init::InitializeGLOneOff(); 67 gl::init::InitializeGLOneOff();
67 68
68 // The ContextFactory must exist before any Compositors are created. 69 // The ContextFactory must exist before any Compositors are created.
69 bool context_factory_for_test = false; 70 bool context_factory_for_test = false;
71 cc::SurfaceManager surface_manager;
70 std::unique_ptr<ui::InProcessContextFactory> context_factory( 72 std::unique_ptr<ui::InProcessContextFactory> context_factory(
71 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); 73 new ui::InProcessContextFactory(context_factory_for_test,
74 &surface_manager));
72 context_factory->set_use_test_surface(false); 75 context_factory->set_use_test_surface(false);
73 76
74 base::MessageLoopForUI message_loop; 77 base::MessageLoopForUI message_loop;
75 78
76 base::i18n::InitializeICU(); 79 base::i18n::InitializeICU();
77 80
78 ui::RegisterPathProvider(); 81 ui::RegisterPathProvider();
79 82
80 base::FilePath ui_test_pak_path; 83 base::FilePath ui_test_pak_path;
81 CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 84 CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 122 }
120 123
121 ui::ShutdownInputMethod(); 124 ui::ShutdownInputMethod();
122 125
123 #if defined(USE_AURA) 126 #if defined(USE_AURA)
124 env.reset(); 127 env.reset();
125 #endif 128 #endif
126 129
127 return 0; 130 return 0;
128 } 131 }
OLDNEW
« no previous file with comments | « ui/views/examples/DEPS ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698