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

Side by Side Diff: ui/compositor/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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 root_web_layer_ = cc::Layer::Create(); 203 root_web_layer_ = cc::Layer::Create();
204 root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f)); 204 root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f));
205 205
206 CommandLine* command_line = CommandLine::ForCurrentProcess(); 206 CommandLine* command_line = CommandLine::ForCurrentProcess();
207 207
208 cc::LayerTreeSettings settings; 208 cc::LayerTreeSettings settings;
209 settings.refresh_rate = 209 settings.refresh_rate =
210 ContextFactory::GetInstance()->DoesCreateTestContexts() 210 ContextFactory::GetInstance()->DoesCreateTestContexts()
211 ? kTestRefreshRate 211 ? kTestRefreshRate
212 : kDefaultRefreshRate; 212 : kDefaultRefreshRate;
213 settings.start_commit_before_draw_enabled =
danakj 2014/02/28 21:19:12 Did you collect any data for the browser composito
brianderson 2014/02/28 21:36:28 I have not. Theoretically, this wont make a differ
danakj 2014/02/28 21:52:58 I'm worried that if we commit sooner we miss rende
214 cc::switches::IsStartCommitBeforeDrawEnabled();
215 settings.start_commit_before_activate_enabled =
216 cc::switches::IsStartCommitBeforeActivateEnabled();
213 settings.partial_swap_enabled = 217 settings.partial_swap_enabled =
214 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 218 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
215 #if defined(OS_CHROMEOS) 219 #if defined(OS_CHROMEOS)
216 settings.per_tile_painting_enabled = true; 220 settings.per_tile_painting_enabled = true;
217 #endif 221 #endif
218 222
219 // These flags should be mirrored by renderer versions in content/renderer/. 223 // These flags should be mirrored by renderer versions in content/renderer/.
220 settings.initial_debug_state.show_debug_borders = 224 settings.initial_debug_state.show_debug_borders =
221 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 225 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
222 settings.initial_debug_state.show_fps_counter = 226 settings.initial_debug_state.show_fps_counter =
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // CompositorObservers to be notified before starting another 559 // CompositorObservers to be notified before starting another
556 // draw cycle. 560 // draw cycle.
557 ScheduleDraw(); 561 ScheduleDraw();
558 } 562 }
559 FOR_EACH_OBSERVER(CompositorObserver, 563 FOR_EACH_OBSERVER(CompositorObserver,
560 observer_list_, 564 observer_list_,
561 OnCompositingEnded(this)); 565 OnCompositingEnded(this));
562 } 566 }
563 567
564 } // namespace ui 568 } // namespace ui
OLDNEW
« cc/scheduler/scheduler_state_machine.cc ('K') | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698