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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1308053006: CC Animations: Enable external animation host for blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Restore whitespace_file.txt Created 5 years 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 settings.renderer_settings.disable_display_vsync = true; 242 settings.renderer_settings.disable_display_vsync = true;
243 settings.wait_for_beginframe_interval = false; 243 settings.wait_for_beginframe_interval = false;
244 } 244 }
245 } 245 }
246 settings.main_frame_before_activation_enabled = 246 settings.main_frame_before_activation_enabled =
247 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 247 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
248 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 248 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
249 settings.accelerated_animation_enabled = 249 settings.accelerated_animation_enabled =
250 compositor_deps_->IsThreadedAnimationEnabled(); 250 compositor_deps_->IsThreadedAnimationEnabled();
251 251
252 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { 252 settings.use_compositor_animation_timelines =
253 settings.use_compositor_animation_timelines = true; 253 !cmd->HasSwitch(switches::kDisableCompositorAnimationTimelines);
254 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); 254 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(
255 } 255 settings.use_compositor_animation_timelines);
256 256
257 settings.default_tile_size = CalculateDefaultTileSize(widget_); 257 settings.default_tile_size = CalculateDefaultTileSize(widget_);
258 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 258 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
259 int tile_width = 0; 259 int tile_width = 0;
260 GetSwitchValueAsInt(*cmd, 260 GetSwitchValueAsInt(*cmd,
261 switches::kDefaultTileWidth, 261 switches::kDefaultTileWidth,
262 1, 262 1,
263 std::numeric_limits<int>::max(), 263 std::numeric_limits<int>::max(),
264 &tile_width); 264 &tile_width);
265 settings.default_tile_size.set_width(tile_width); 265 settings.default_tile_size.set_width(tile_width);
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 #endif 1115 #endif
1116 return actual; 1116 return actual;
1117 } 1117 }
1118 1118
1119 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1119 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1120 float device_scale) { 1120 float device_scale) {
1121 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1121 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1122 } 1122 }
1123 1123
1124 } // namespace content 1124 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698