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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 17265006: wayland patch for inspection Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/power_save_blocker_wayland.cc ('k') | content/content_browser.gypi » ('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 "content/browser/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 }; 1041 };
1042 1042
1043 } // anonymous namespace 1043 } // anonymous namespace
1044 1044
1045 // static 1045 // static
1046 void ImageTransportFactory::Initialize() { 1046 void ImageTransportFactory::Initialize() {
1047 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1047 CommandLine* command_line = CommandLine::ForCurrentProcess();
1048 if (command_line->HasSwitch(switches::kTestCompositor)) { 1048 if (command_line->HasSwitch(switches::kTestCompositor)) {
1049 ui::SetupTestCompositor(); 1049 ui::SetupTestCompositor();
1050 } 1050 }
1051
1052 #if defined(USE_WAYLAND)
1053 g_factory = new NoTransportFactory(NULL);
1054 #else
1051 if (ui::IsTestCompositorEnabled()) { 1055 if (ui::IsTestCompositorEnabled()) {
1052 g_factory = new NoTransportFactory(new ui::TestContextFactory); 1056 g_factory = new NoTransportFactory(new ui::TestContextFactory);
1053 } else if (command_line->HasSwitch(switches::kUIEnableSoftwareCompositing)) { 1057 } else if (command_line->HasSwitch(switches::kUIEnableSoftwareCompositing)) {
1054 g_factory = new NoTransportFactory(new SoftwareContextFactory); 1058 g_factory = new NoTransportFactory(new SoftwareContextFactory);
1055 } else { 1059 } else {
1056 g_factory = new GpuProcessTransportFactory; 1060 g_factory = new GpuProcessTransportFactory;
1057 } 1061 }
1058 ui::ContextFactory::SetInstance(g_factory->AsContextFactory()); 1062 ui::ContextFactory::SetInstance(g_factory->AsContextFactory());
1063 #endif
1059 } 1064 }
1060 1065
1061 // static 1066 // static
1062 void ImageTransportFactory::Terminate() { 1067 void ImageTransportFactory::Terminate() {
1063 ui::ContextFactory::SetInstance(NULL); 1068 ui::ContextFactory::SetInstance(NULL);
1064 delete g_factory; 1069 delete g_factory;
1065 g_factory = NULL; 1070 g_factory = NULL;
1066 } 1071 }
1067 1072
1068 // static 1073 // static
1069 ImageTransportFactory* ImageTransportFactory::GetInstance() { 1074 ImageTransportFactory* ImageTransportFactory::GetInstance() {
1070 return g_factory; 1075 return g_factory;
1071 } 1076 }
1072 1077
1073 } // namespace content 1078 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/power_save_blocker_wayland.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698