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

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

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unittest Created 5 years, 9 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(USE_AURA)
205 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); 205 settings.use_external_begin_frame_source = true;
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 if (cmd->HasSwitch(switches::kEnableSlimmingPaint)) { 214 if (cmd->HasSwitch(switches::kEnableSlimmingPaint)) {
214 settings.use_display_lists = true; 215 settings.use_display_lists = true;
215 blink::WebRuntimeFeatures::enableSlimmingPaint(true); 216 blink::WebRuntimeFeatures::enableSlimmingPaint(true);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 cc::ContextProvider* provider = 912 cc::ContextProvider* provider =
912 compositor_deps_->GetSharedMainThreadContextProvider(); 913 compositor_deps_->GetSharedMainThreadContextProvider();
913 // provider can be NULL after the GPU process crashed enough times and we 914 // provider can be NULL after the GPU process crashed enough times and we
914 // don't want to restart it any more (falling back to software). 915 // don't want to restart it any more (falling back to software).
915 if (!provider) 916 if (!provider)
916 return; 917 return;
917 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 918 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
918 } 919 }
919 920
920 } // namespace content 921 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698