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

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

Issue 1124523003: Revert of Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/compositor/BUILD.gn » ('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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 226 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
227 settings.report_overscroll_only_for_scrollable_axes = 227 settings.report_overscroll_only_for_scrollable_axes =
228 !compositor_deps_->IsElasticOverscrollEnabled(); 228 !compositor_deps_->IsElasticOverscrollEnabled();
229 settings.accelerated_animation_enabled = 229 settings.accelerated_animation_enabled =
230 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 230 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
231 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); 231 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint);
232 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { 232 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) {
233 settings.use_compositor_animation_timelines = true; 233 settings.use_compositor_animation_timelines = true;
234 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true); 234 blink::WebRuntimeFeatures::enableCompositorAnimationTimelines(true);
235 } 235 }
236 #if !defined(OS_MACOSX) 236 if (cmd->HasSwitch(switches::kEnableBeginFrameScheduling) &&
237 if (!widget_->for_oopif()) { 237 !widget_->for_oopif()) {
238 // TODO(simonhong): Apply BeginFrame scheduling for OOPIF. 238 // TODO(simonhong): Apply BeginFrame scheduling for OOPIF.
239 // See crbug.com/471411. 239 // See crbug.com/471411.
240 settings.use_external_begin_frame_source = true; 240 settings.use_external_begin_frame_source = true;
241 } 241 }
242 #endif
243 242
244 settings.default_tile_size = CalculateDefaultTileSize(widget_); 243 settings.default_tile_size = CalculateDefaultTileSize(widget_);
245 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 244 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
246 int tile_width = 0; 245 int tile_width = 0;
247 GetSwitchValueAsInt(*cmd, 246 GetSwitchValueAsInt(*cmd,
248 switches::kDefaultTileWidth, 247 switches::kDefaultTileWidth,
249 1, 248 1,
250 std::numeric_limits<int>::max(), 249 std::numeric_limits<int>::max(),
251 &tile_width); 250 &tile_width);
252 settings.default_tile_size.set_width(tile_width); 251 settings.default_tile_size.set_width(tile_width);
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 cc::ContextProvider* provider = 936 cc::ContextProvider* provider =
938 compositor_deps_->GetSharedMainThreadContextProvider(); 937 compositor_deps_->GetSharedMainThreadContextProvider();
939 // provider can be NULL after the GPU process crashed enough times and we 938 // provider can be NULL after the GPU process crashed enough times and we
940 // don't want to restart it any more (falling back to software). 939 // don't want to restart it any more (falling back to software).
941 if (!provider) 940 if (!provider)
942 return; 941 return;
943 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 942 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
944 } 943 }
945 944
946 } // namespace content 945 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | ui/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698