Index: cc/util.cc |
diff --git a/cc/util.cc b/cc/util.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..75019e9822b54976f717bd18188e497ca5bcc64b |
--- /dev/null |
+++ b/cc/util.cc |
@@ -0,0 +1,19 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "base/command_line.h" |
+#include "cc/switches.h" |
+ |
+namespace cc { |
+ |
+bool IsImplSidePaintingEnabled(const CommandLine *cl) |
+{ |
+ // The disable flag takes precedence over the enable flag. |
+ if (cl->HasSwitch(cc::switches::kDisableImplSidePainting)) |
+ return false; |
+ |
+ return cl->HasSwitch(cc::switches::kEnableImplSidePainting); |
+} |
+ |
+} // namespace cc |