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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working on aura with --enable-begin-frame-scheduling Created 6 years, 4 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) 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 cc::LayerTreeSettings settings; 164 cc::LayerTreeSettings settings;
165 165
166 // For web contents, layer transforms should scale up the contents of layers 166 // For web contents, layer transforms should scale up the contents of layers
167 // to keep content always crisp when possible. 167 // to keep content always crisp when possible.
168 settings.layer_transforms_should_scale_layer_contents = true; 168 settings.layer_transforms_should_scale_layer_contents = true;
169 169
170 settings.throttle_frame_production = 170 settings.throttle_frame_production =
171 !cmd->HasSwitch(switches::kDisableGpuVsync); 171 !cmd->HasSwitch(switches::kDisableGpuVsync);
172 settings.begin_frame_scheduling_enabled = 172 settings.begin_frame_scheduling_enabled =
173 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); 173 cmd->HasSwitch(cc::switches::kEnableBeginFrameScheduling);
174 settings.main_frame_before_activation_enabled = 174 settings.main_frame_before_activation_enabled =
175 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 175 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
176 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 176 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
177 settings.main_frame_before_draw_enabled = 177 settings.main_frame_before_draw_enabled =
178 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw); 178 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw);
179 settings.report_overscroll_only_for_scrollable_axes = true; 179 settings.report_overscroll_only_for_scrollable_axes = true;
180 settings.accelerated_animation_enabled = 180 settings.accelerated_animation_enabled =
181 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 181 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
182 182
183 settings.default_tile_size = CalculateDefaultTileSize(); 183 settings.default_tile_size = CalculateDefaultTileSize();
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 widget_->OnSwapBuffersAborted(); 799 widget_->OnSwapBuffersAborted();
800 } 800 }
801 801
802 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 802 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
803 cc::ContextProvider* provider = 803 cc::ContextProvider* provider =
804 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 804 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
805 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 805 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
806 } 806 }
807 807
808 } // namespace content 808 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698