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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10459016: Disable accelerated animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 prefs.force_compositing_mode = 448 prefs.force_compositing_mode =
449 command_line.HasSwitch(switches::kForceCompositingMode); 449 command_line.HasSwitch(switches::kForceCompositingMode);
450 prefs.fixed_position_compositing_enabled = 450 prefs.fixed_position_compositing_enabled =
451 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); 451 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
452 prefs.accelerated_2d_canvas_enabled = 452 prefs.accelerated_2d_canvas_enabled =
453 GpuProcessHost::gpu_enabled() && 453 GpuProcessHost::gpu_enabled() &&
454 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 454 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
455 prefs.deferred_2d_canvas_enabled = 455 prefs.deferred_2d_canvas_enabled =
456 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); 456 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas);
457 prefs.threaded_animation_enabled = 457 prefs.threaded_animation_enabled =
458 !command_line.HasSwitch(switches::kDisableThreadedAnimation); 458 command_line.HasSwitch(switches::kEnableAcceleratedAnimation);
459 prefs.accelerated_painting_enabled = 459 prefs.accelerated_painting_enabled =
460 GpuProcessHost::gpu_enabled() && 460 GpuProcessHost::gpu_enabled() &&
461 command_line.HasSwitch(switches::kEnableAcceleratedPainting); 461 command_line.HasSwitch(switches::kEnableAcceleratedPainting);
462 prefs.accelerated_filters_enabled = 462 prefs.accelerated_filters_enabled =
463 GpuProcessHost::gpu_enabled() && 463 GpuProcessHost::gpu_enabled() &&
464 command_line.HasSwitch(switches::kEnableAcceleratedFilters); 464 command_line.HasSwitch(switches::kEnableAcceleratedFilters);
465 prefs.accelerated_layers_enabled = 465 prefs.accelerated_layers_enabled =
466 prefs.accelerated_animation_enabled = 466 prefs.accelerated_animation_enabled =
467 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 467 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
468 prefs.accelerated_plugins_enabled = 468 prefs.accelerated_plugins_enabled =
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 browser_plugin_host()->embedder_render_process_host(); 3064 browser_plugin_host()->embedder_render_process_host();
3065 *embedder_container_id = browser_plugin_host()->instance_id(); 3065 *embedder_container_id = browser_plugin_host()->instance_id();
3066 int embedder_process_id = 3066 int embedder_process_id =
3067 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3067 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3068 if (embedder_process_id != -1) { 3068 if (embedder_process_id != -1) {
3069 *embedder_channel_name = 3069 *embedder_channel_name =
3070 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3070 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3071 embedder_process_id); 3071 embedder_process_id);
3072 } 3072 }
3073 } 3073 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698