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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 435383002: adds WARP support to Chromium, for Metro mode only, on Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 | Annotate | Revision Log
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 "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "content/public/app/content_main.h" 7 #include "content/public/app/content_main.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h" 11 #include "base/debug/dump_without_crashing.h"
11 #include "base/win/win_util.h" 12 #include "base/win/win_util.h"
12 #include "chrome/common/chrome_constants.h" 13 #include "chrome/common/chrome_constants.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "gpu/config/gpu_info_collector.h"
13 16
14 #define DLLEXPORT __declspec(dllexport) 17 #define DLLEXPORT __declspec(dllexport)
15 18
16 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. 19 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
17 extern "C" { 20 extern "C" {
18 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, 21 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
19 sandbox::SandboxInterfaceInfo* sandbox_info); 22 sandbox::SandboxInterfaceInfo* sandbox_info);
20 } 23 }
21 #elif defined(OS_POSIX) 24 #elif defined(OS_POSIX)
22 extern "C" { 25 extern "C" {
(...skipping 19 matching lines...) Expand all
42 params.sandbox_info = sandbox_info; 45 params.sandbox_info = sandbox_info;
43 46
44 // SetDumpWithoutCrashingFunction must be passed the DumpProcess function 47 // SetDumpWithoutCrashingFunction must be passed the DumpProcess function
45 // from the EXE and not from the DLL in order for DumpWithoutCrashing to 48 // from the EXE and not from the DLL in order for DumpWithoutCrashing to
46 // function correctly. 49 // function correctly.
47 typedef void (__cdecl *DumpProcessFunction)(); 50 typedef void (__cdecl *DumpProcessFunction)();
48 DumpProcessFunction DumpProcess = reinterpret_cast<DumpProcessFunction>( 51 DumpProcessFunction DumpProcess = reinterpret_cast<DumpProcessFunction>(
49 ::GetProcAddress(::GetModuleHandle(chrome::kBrowserProcessExecutableName), 52 ::GetProcAddress(::GetModuleHandle(chrome::kBrowserProcessExecutableName),
50 "DumpProcessWithoutCrash")); 53 "DumpProcessWithoutCrash"));
51 base::debug::SetDumpWithoutCrashingFunction(DumpProcess); 54 base::debug::SetDumpWithoutCrashingFunction(DumpProcess);
55
56 if (CommandLine::InitializedForCurrentProcess()) {
57 gpu::SetShouldFallbackToWarp(
58 CommandLine::ForCurrentProcess()->HasSwitch(switches::kViewerConnect));
Zhenyao Mo 2014/08/29 18:28:50 It seems to me that we add ShouldFallbackToWarp()
luken 2014/08/29 23:34:03 I moved it. Since kViewerConnect needs to be used
59 }
52 #else 60 #else
53 params.argc = argc; 61 params.argc = argc;
54 params.argv = argv; 62 params.argv = argv;
55 #endif 63 #endif
56 64
57 int rv = content::ContentMain(params); 65 int rv = content::ContentMain(params);
58 66
59 #if defined(OS_WIN) 67 #if defined(OS_WIN)
60 base::win::SetShouldCrashOnProcessDetach(false); 68 base::win::SetShouldCrashOnProcessDetach(false);
61 #endif 69 #endif
62 70
63 return rv; 71 return rv;
64 } 72 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | content/browser/gpu/gpu_data_manager_impl_private.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698