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

Unified Diff: ui/base/cocoa/remote_layer_api.mm

Issue 464063005: Add a flag to enable remote CoreAnimation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/cocoa/remote_layer_api.mm
diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm
index c58402ffe9ae3e84d0d3a4134c739f39810d1840..1bf64b46cfb1c3024e95e9b32614e0b1860ad7bc 100644
--- a/ui/base/cocoa/remote_layer_api.mm
+++ b/ui/base/cocoa/remote_layer_api.mm
@@ -4,11 +4,20 @@
#include "ui/base/cocoa/remote_layer_api.h"
+#include "base/command_line.h"
+#include "ui/base/ui_base_switches.h"
+
#include <objc/runtime.h>
namespace ui {
bool RemoteLayerAPISupported() {
+ static bool enabled_at_command_line =
sky 2014/08/14 00:19:08 Unless there is really a reason to make this stati
ccameron 2014/08/14 00:33:31 Done.
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableRemoteCoreAnimation);
+ if (!enabled_at_command_line)
+ return false;
+
// Verify the GPU process interfaces are present.
static Class caContextClass = NSClassFromString(@"CAContext");
if (!caContextClass)

Powered by Google App Engine
This is Rietveld 408576698