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

Side by Side Diff: blimp/client/app/blimp_startup.cc

Issue 1920163005: Split //ui/gl into //ui/gl + //ui/gi/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 | « blimp/client/BUILD.gn ('k') | components/mus/gles2/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/app/blimp_startup.h" 5 #include "blimp/client/app/blimp_startup.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "blimp/client/app/blimp_discardable_memory_allocator.h" 15 #include "blimp/client/app/blimp_discardable_memory_allocator.h"
16 #include "blimp/client/feature/compositor/decoding_image_generator.h" 16 #include "blimp/client/feature/compositor/decoding_image_generator.h"
17 #include "third_party/skia/include/core/SkGraphics.h" 17 #include "third_party/skia/include/core/SkGraphics.h"
18 #include "ui/gl/gl_surface.h" 18 #include "ui/gl/init/gl_factory.h"
19 19
20 class SkImageGenerator; 20 class SkImageGenerator;
21 21
22 namespace { 22 namespace {
23 base::LazyInstance<std::unique_ptr<base::MessageLoopForUI>> 23 base::LazyInstance<std::unique_ptr<base::MessageLoopForUI>>
24 g_main_message_loop = LAZY_INSTANCE_INITIALIZER; 24 g_main_message_loop = LAZY_INSTANCE_INITIALIZER;
25 25
26 base::LazyInstance<blimp::client::BlimpDiscardableMemoryAllocator> 26 base::LazyInstance<blimp::client::BlimpDiscardableMemoryAllocator>
27 g_discardable_memory_allocator = LAZY_INSTANCE_INITIALIZER; 27 g_discardable_memory_allocator = LAZY_INSTANCE_INITIALIZER;
28 28
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() 66 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel()
67 << ", default verbosity = " << logging::GetVlogVerbosity(); 67 << ", default verbosity = " << logging::GetVlogVerbosity();
68 } 68 }
69 69
70 bool InitializeMainMessageLoop() { 70 bool InitializeMainMessageLoop() {
71 // TODO(dtrainor): Initialize ICU? 71 // TODO(dtrainor): Initialize ICU?
72 72
73 // Set the DiscardableMemoryAllocator. 73 // Set the DiscardableMemoryAllocator.
74 base::DiscardableMemoryAllocator::SetInstance( 74 base::DiscardableMemoryAllocator::SetInstance(
75 g_discardable_memory_allocator.Pointer()); 75 g_discardable_memory_allocator.Pointer());
76 if (!gfx::GLSurface::InitializeOneOff()) 76 if (!gl::init::InitializeGLOneOff())
77 return false; 77 return false;
78 SkGraphics::Init(); 78 SkGraphics::Init();
79 SkGraphics::SetImageGeneratorFromEncodedFactory(CreateImageGenerator); 79 SkGraphics::SetImageGeneratorFromEncodedFactory(CreateImageGenerator);
80 g_main_message_loop.Get().reset(new base::MessageLoopForUI); 80 g_main_message_loop.Get().reset(new base::MessageLoopForUI);
81 return true; 81 return true;
82 } 82 }
83 83
84 } // namespace client 84 } // namespace client
85 } // namespace blimp 85 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/BUILD.gn ('k') | components/mus/gles2/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698