diff options
| -rw-r--r-- | chrome/browser/about_flags.cc | 32 | ||||
| -rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 4 | ||||
| -rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 4 | ||||
| -rw-r--r-- | chrome/common/chrome_switches.cc | 13 | ||||
| -rw-r--r-- | chrome/common/chrome_switches.h | 4 | ||||
| -rw-r--r-- | chrome/common/sandbox_init_wrapper_mac.cc | 2 | ||||
| -rw-r--r-- | chrome/common/sandbox_policy.cc | 2 | ||||
| -rw-r--r-- | chrome/renderer/render_thread.cc | 2 | ||||
| -rw-r--r-- | chrome/renderer/render_view.cc | 2 | ||||
| -rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 4 |
10 files changed, 32 insertions, 37 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index fcbabe7..b900631 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -128,15 +128,13 @@ const Experiment kExperiments[] = { kOsMac, switches::kEnableMatchPreview }, - // FIXME(scheib): Add Flags entry for accelerated Compositing, - // or pull it and the strings in generated_resources.grd by Dec 2010 - // { - // "gpu-compositing", // Do not change; see above - // IDS_FLAGS_ACCELERATED_COMPOSITING_NAME, - // IDS_FLAGS_ACCELERATED_COMPOSITING_DESCRIPTION, - // kOsAll, - // switches::kDisableAcceleratedCompositing - // }, + { + "gpu-compositing", // Do not change; see above + IDS_FLAGS_ACCELERATED_COMPOSITING_NAME, + IDS_FLAGS_ACCELERATED_COMPOSITING_DESCRIPTION, + kOsAll, + switches::kEnableAcceleratedCompositing + }, { "gpu-canvas-2d", // Do not change; see above IDS_FLAGS_ACCELERATED_CANVAS_2D_NAME, @@ -144,15 +142,13 @@ const Experiment kExperiments[] = { kOsWin | kOsLinux | kOsCrOS, switches::kEnableAccelerated2dCanvas }, - // FIXME(scheib): Add Flags entry for WebGL, - // or pull it and the strings in generated_resources.grd by Dec 2010 - // { - // "webgl", // Do not change; see above - // IDS_FLAGS_WEBGL_NAME, - // IDS_FLAGS_WEBGL_DESCRIPTION, - // kOsAll, - // switches::kDisableExperimentalWebGL - // } + { + "webgl", // Do not change; see above + IDS_FLAGS_WEBGL_NAME, + IDS_FLAGS_WEBGL_DESCRIPTION, + kOsAll, + switches::kEnableExperimentalWebGL + }, { "print-preview", // Do not change; see above IDS_FLAGS_PRINT_PREVIEW_NAME, diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index b7af07f..a362c75 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -604,10 +604,10 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( // WebGLArray constructors on the DOMWindow visible. This // information is needed very early during bringup. We prefer to // use the WebPreferences to set this flag on a page-by-page basis. - switches::kDisableExperimentalWebGL, + switches::kEnableExperimentalWebGL, switches::kDisableGLSLTranslator, switches::kInProcessWebGL, - switches::kDisableAcceleratedCompositing, + switches::kEnableAcceleratedCompositing, #if defined(OS_MACOSX) // Allow this to be set when invoking the browser and relayed along. switches::kEnableSandboxLogging, diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index b94ab7d..69ae618 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -280,7 +280,7 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( web_prefs.databases_enabled = !command_line.HasSwitch(switches::kDisableDatabases); web_prefs.experimental_webgl_enabled = - !command_line.HasSwitch(switches::kDisableExperimentalWebGL); + command_line.HasSwitch(switches::kEnableExperimentalWebGL); web_prefs.site_specific_quirks_enabled = !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); web_prefs.allow_file_access_from_file_urls = @@ -288,7 +288,7 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( web_prefs.show_composited_layer_borders = command_line.HasSwitch(switches::kShowCompositedLayerBorders); web_prefs.accelerated_compositing_enabled = - !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); + command_line.HasSwitch(switches::kEnableAcceleratedCompositing); web_prefs.accelerated_2d_canvas_enabled = command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); web_prefs.memory_info_enabled = diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 9847a38..0250821 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -111,10 +111,6 @@ const char kDebugPrint[] = "debug-print"; // Triggers a pletora of diagnostic modes. const char kDiagnostics[] = "diagnostics"; -// Disables accelerated compositing. -const char kDisableAcceleratedCompositing[] = - "disable-accelerated-compositing"; - // Disables the alternate window station for the renderer. const char kDisableAltWinstation[] = "disable-winsta"; @@ -174,9 +170,6 @@ const char kDisableDevTools[] = "disable-dev-tools"; // Disables device orientation events. const char kDisableDeviceOrientation[] = "disable-device-orientation"; -// Disable experimental WebGL support. -const char kDisableExperimentalWebGL[] = "disable-webgl"; - // Disable extensions. const char kDisableExtensions[] = "disable-extensions"; @@ -355,6 +348,9 @@ extern const char kLogNetLog[] = "log-net-log"; // Enable gpu-accelerated 2d canvas. const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas"; +// Enable gpu-accelerated compositing. +const char kEnableAcceleratedCompositing[] = "enable-accelerated-compositing"; + // Enables WebKit accessibility within the renderer process. const char kEnableAccessibility[] = "enable-accessibility"; @@ -409,6 +405,9 @@ const char kEnableDNSSECCerts[] = "enable-dnssec-certs"; const char kEnableExperimentalExtensionApis[] = "enable-experimental-extension-apis"; +// Enable experimental WebGL support. +const char kEnableExperimentalWebGL[] = "enable-webgl"; + // Enable experimental timeline API. const char kEnableExtensionTimelineApi[] = "enable-extension-timeline-api"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 14e3ae3..dea5ac9 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -45,7 +45,6 @@ extern const char kCloudPrintServiceURL[]; extern const char kCountry[]; extern const char kDebugPrint[]; extern const char kDiagnostics[]; -extern const char kDisableAcceleratedCompositing[]; extern const char kDisableAltWinstation[]; extern const char kDisableApplicationCache[]; extern const char kDisableAudio[]; @@ -61,7 +60,6 @@ extern const char kDisableDatabases[]; extern const char kDisableDesktopNotifications[]; extern const char kDisableDevTools[]; extern const char kDisableDeviceOrientation[]; -extern const char kDisableExperimentalWebGL[]; extern const char kDisableExtensionsFileAccessCheck[]; extern const char kDisableExtensions[]; extern const char kDisableFileSystem[]; @@ -112,6 +110,7 @@ extern const char kDnsServer[]; extern const char kDomAutomationController[]; extern const char kDumpHistogramsOnExit[]; extern const char kEnableAccelerated2dCanvas[]; +extern const char kEnableAcceleratedCompositing[]; extern const char kEnableAccessibility[]; extern const char kEnableAeroPeekTabs[]; extern const char kEnableAppLauncher[]; @@ -127,6 +126,7 @@ extern const char kEnableDefaultApps[]; extern const char kEnableDeviceMotion[]; extern const char kEnableDNSSECCerts[]; extern const char kEnableExperimentalExtensionApis[]; +extern const char kEnableExperimentalWebGL[]; extern const char kEnableExtensionTimelineApi[]; extern const char kEnableFastback[]; extern const char kEnableFileCookies[]; diff --git a/chrome/common/sandbox_init_wrapper_mac.cc b/chrome/common/sandbox_init_wrapper_mac.cc index ca21255..d3017b7 100644 --- a/chrome/common/sandbox_init_wrapper_mac.cc +++ b/chrome/common/sandbox_init_wrapper_mac.cc @@ -22,7 +22,7 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, // Browser process isn't sandboxed. return true; } else if (process_type == switches::kRendererProcess) { - if (!command_line.HasSwitch(switches::kDisableExperimentalWebGL) && + if (command_line.HasSwitch(switches::kEnableExperimentalWebGL) && command_line.HasSwitch(switches::kInProcessWebGL)) { // TODO(kbr): this check seems to be necessary only on this // platform because the sandbox is initialized later. Remove diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc index f97da8a..8fb0bd5 100644 --- a/chrome/common/sandbox_policy.cc +++ b/chrome/common/sandbox_policy.cc @@ -494,7 +494,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, in_sandbox = false; } #endif - if (!browser_command_line.HasSwitch(switches::kDisableExperimentalWebGL) && + if (browser_command_line.HasSwitch(switches::kEnableExperimentalWebGL) && browser_command_line.HasSwitch(switches::kInProcessWebGL)) { // In process WebGL won't work if the sandbox is enabled. in_sandbox = false; diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 4ce5f7f..5d5c2a6 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -910,7 +910,7 @@ void RenderThread::EnsureWebKitInitialized() { !command_line.HasSwitch(switches::kDisableGeolocation)); WebRuntimeFeatures::enableWebGL( - !command_line.HasSwitch(switches::kDisableExperimentalWebGL)); + command_line.HasSwitch(switches::kEnableExperimentalWebGL)); WebRuntimeFeatures::enablePushState(true); diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 586471e..09caae4 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2550,7 +2550,7 @@ WebMediaPlayer* RenderView::createMediaPlayer( } if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) && - !cmd_line->HasSwitch(switches::kDisableAcceleratedCompositing)) { + cmd_line->HasSwitch(switches::kEnableAcceleratedCompositing)) { // Add the hardware video decoder factory. // TODO(hclam): This assumes that ggl::Context is set to current // internally. I need to make it more explicit to get the context. diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc index 1ffd0fe..3bae57f 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -107,8 +107,8 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize( kWebGraphicsContext3DPerferredGLExtensions, attribs); } else { - bool compositing_enabled = !CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableAcceleratedCompositing); + bool compositing_enabled = CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableAcceleratedCompositing); ggl::Context* parent_context = NULL; // If GPU compositing is enabled we need to create a GL context that shares // resources with the compositor's context. |
