| OLD | NEW |
| 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/engine/app/blimp_engine_config.h" | 5 #include "blimp/engine/app/blimp_engine_config.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ::switches::kUseGL, | 34 ::switches::kUseGL, |
| 35 "osmesa"); // Avoid invoking gpu::CollectDriverVersionNVidia. | 35 "osmesa"); // Avoid invoking gpu::CollectDriverVersionNVidia. |
| 36 | 36 |
| 37 // Disable threaded animation since we don't support them right now. | 37 // Disable threaded animation since we don't support them right now. |
| 38 // (crbug/570376). | 38 // (crbug/570376). |
| 39 command_line->AppendSwitch(cc::switches::kDisableThreadedAnimation); | 39 command_line->AppendSwitch(cc::switches::kDisableThreadedAnimation); |
| 40 | 40 |
| 41 // Disable use-zoom-for-dsf since it ends up overriding the device scale | 41 // Disable use-zoom-for-dsf since it ends up overriding the device scale |
| 42 // factor reported to the client. See crbug.com/654898. | 42 // factor reported to the client. See crbug.com/654898. |
| 43 command_line->AppendSwitchASCII(::switches::kEnableUseZoomForDSF, "false"); | 43 command_line->AppendSwitchASCII(::switches::kEnableUseZoomForDSF, "false"); |
| 44 | |
| 45 // Enable the updated compositing path. | |
| 46 command_line->AppendSwitch(::switches::kUseLayerTreeHostRemote); | |
| 47 } | 44 } |
| 48 | 45 |
| 49 BlimpEngineConfig::~BlimpEngineConfig() {} | 46 BlimpEngineConfig::~BlimpEngineConfig() {} |
| 50 | 47 |
| 51 // static | 48 // static |
| 52 std::unique_ptr<BlimpEngineConfig> BlimpEngineConfig::Create( | 49 std::unique_ptr<BlimpEngineConfig> BlimpEngineConfig::Create( |
| 53 const base::CommandLine& cmd_line) { | 50 const base::CommandLine& cmd_line) { |
| 54 const std::string client_auth_token = GetClientAuthToken(cmd_line); | 51 const std::string client_auth_token = GetClientAuthToken(cmd_line); |
| 55 if (!client_auth_token.empty()) { | 52 if (!client_auth_token.empty()) { |
| 56 return base::WrapUnique(new BlimpEngineConfig(client_auth_token)); | 53 return base::WrapUnique(new BlimpEngineConfig(client_auth_token)); |
| 57 } | 54 } |
| 58 return nullptr; | 55 return nullptr; |
| 59 } | 56 } |
| 60 | 57 |
| 61 // static | 58 // static |
| 62 std::unique_ptr<BlimpEngineConfig> BlimpEngineConfig::CreateForTest( | 59 std::unique_ptr<BlimpEngineConfig> BlimpEngineConfig::CreateForTest( |
| 63 const std::string& client_auth_token) { | 60 const std::string& client_auth_token) { |
| 64 return base::WrapUnique(new BlimpEngineConfig(client_auth_token)); | 61 return base::WrapUnique(new BlimpEngineConfig(client_auth_token)); |
| 65 } | 62 } |
| 66 | 63 |
| 67 const std::string& BlimpEngineConfig::client_auth_token() const { | 64 const std::string& BlimpEngineConfig::client_auth_token() const { |
| 68 return client_auth_token_; | 65 return client_auth_token_; |
| 69 } | 66 } |
| 70 | 67 |
| 71 BlimpEngineConfig::BlimpEngineConfig(const std::string& client_auth_token) | 68 BlimpEngineConfig::BlimpEngineConfig(const std::string& client_auth_token) |
| 72 : client_auth_token_(client_auth_token) {} | 69 : client_auth_token_(client_auth_token) {} |
| 73 | 70 |
| 74 } // namespace engine | 71 } // namespace engine |
| 75 } // namespace blimp | 72 } // namespace blimp |
| OLD | NEW |