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

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

Issue 23907006: cc: Allow sending BeginMainFrame before draw or activation (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedDeadline3
Patch Set: rebase Created 6 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | ui/compositor/compositor.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 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 cc::LayerTreeSettings settings; 83 cc::LayerTreeSettings settings;
84 84
85 // For web contents, layer transforms should scale up the contents of layers 85 // For web contents, layer transforms should scale up the contents of layers
86 // to keep content always crisp when possible. 86 // to keep content always crisp when possible.
87 settings.layer_transforms_should_scale_layer_contents = true; 87 settings.layer_transforms_should_scale_layer_contents = true;
88 88
89 settings.throttle_frame_production = 89 settings.throttle_frame_production =
90 !cmd->HasSwitch(switches::kDisableGpuVsync); 90 !cmd->HasSwitch(switches::kDisableGpuVsync);
91 settings.begin_impl_frame_scheduling_enabled = 91 settings.begin_impl_frame_scheduling_enabled =
92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling); 92 cmd->HasSwitch(switches::kEnableBeginFrameScheduling);
93 settings.main_frame_before_activation_enabled =
94 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
95 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
96 settings.main_frame_before_draw_enabled =
97 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeDraw);
93 settings.using_synchronous_renderer_compositor = 98 settings.using_synchronous_renderer_compositor =
94 widget->UsingSynchronousRendererCompositor(); 99 widget->UsingSynchronousRendererCompositor();
95 settings.accelerated_animation_enabled = 100 settings.accelerated_animation_enabled =
96 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 101 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
97 settings.touch_hit_testing = 102 settings.touch_hit_testing =
98 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); 103 !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting);
99 104
100 int default_tile_width = settings.default_tile_size.width(); 105 int default_tile_width = settings.default_tile_size.width();
101 if (cmd->HasSwitch(switches::kDefaultTileWidth)) { 106 if (cmd->HasSwitch(switches::kDefaultTileWidth)) {
102 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1, 107 GetSwitchValueAsInt(*cmd, switches::kDefaultTileWidth, 1,
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 widget_->OnSwapBuffersAborted(); 640 widget_->OnSwapBuffersAborted();
636 } 641 }
637 642
638 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 643 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
639 cc::ContextProvider* provider = 644 cc::ContextProvider* provider =
640 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 645 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
641 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 646 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
642 } 647 }
643 648
644 } // namespace content 649 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698