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

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

Issue 1016033006: Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac build Created 5 years, 8 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 194 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
195 195
196 cc::LayerTreeSettings settings; 196 cc::LayerTreeSettings settings;
197 197
198 // For web contents, layer transforms should scale up the contents of layers 198 // For web contents, layer transforms should scale up the contents of layers
199 // to keep content always crisp when possible. 199 // to keep content always crisp when possible.
200 settings.layer_transforms_should_scale_layer_contents = true; 200 settings.layer_transforms_should_scale_layer_contents = true;
201 201
202 settings.throttle_frame_production = 202 settings.throttle_frame_production =
203 !cmd->HasSwitch(switches::kDisableGpuVsync); 203 !cmd->HasSwitch(switches::kDisableGpuVsync);
204 settings.use_external_begin_frame_source = 204 #if !defined(OS_MACOSX)
205 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); 205 settings.use_external_begin_frame_source = true;
danakj 2015/03/25 17:40:38 no longer used then? shall we remove the switch?
simonhong 2015/03/25 18:05:22 Yep. removed.
206 #endif
206 settings.main_frame_before_activation_enabled = 207 settings.main_frame_before_activation_enabled =
207 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 208 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
208 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 209 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
209 settings.report_overscroll_only_for_scrollable_axes = 210 settings.report_overscroll_only_for_scrollable_axes =
210 !compositor_deps_->IsElasticOverscrollEnabled(); 211 !compositor_deps_->IsElasticOverscrollEnabled();
211 settings.accelerated_animation_enabled = 212 settings.accelerated_animation_enabled =
212 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 213 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
213 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); 214 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint);
214 215
215 settings.default_tile_size = CalculateDefaultTileSize(); 216 settings.default_tile_size = CalculateDefaultTileSize();
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 cc::ContextProvider* provider = 907 cc::ContextProvider* provider =
907 compositor_deps_->GetSharedMainThreadContextProvider(); 908 compositor_deps_->GetSharedMainThreadContextProvider();
908 // provider can be NULL after the GPU process crashed enough times and we 909 // provider can be NULL after the GPU process crashed enough times and we
909 // don't want to restart it any more (falling back to software). 910 // don't want to restart it any more (falling back to software).
910 if (!provider) 911 if (!provider)
911 return; 912 return;
912 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 913 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
913 } 914 }
914 915
915 } // namespace content 916 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698