| OLD | NEW |
| 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 "ui/compositor/compositor_switches.h" | 5 #include "ui/compositor/compositor_switches.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 | 8 |
| 9 namespace switches { | 9 namespace switches { |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } // namespace switches | 27 } // namespace switches |
| 28 | 28 |
| 29 namespace ui { | 29 namespace ui { |
| 30 | 30 |
| 31 bool IsUIZeroCopyEnabled() { | 31 bool IsUIZeroCopyEnabled() { |
| 32 const base::CommandLine& command_line = | 32 const base::CommandLine& command_line = |
| 33 *base::CommandLine::ForCurrentProcess(); | 33 *base::CommandLine::ForCurrentProcess(); |
| 34 return command_line.HasSwitch(switches::kUIEnableZeroCopy); | 34 return command_line.HasSwitch(switches::kUIEnableZeroCopy); |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool IsUIOneCopyEnabled() { | |
| 38 // One-copy is on by default unless zero copy is enabled. | |
| 39 return !IsUIZeroCopyEnabled(); | |
| 40 } | |
| 41 | |
| 42 } // namespace ui | 37 } // namespace ui |
| OLD | NEW |