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

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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | 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) 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.main_frame_before_draw_enabled = false;
214 settings.main_frame_before_activation_enabled = false;
213 settings.partial_swap_enabled = 215 settings.partial_swap_enabled =
214 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 216 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
215 #if defined(OS_CHROMEOS) 217 #if defined(OS_CHROMEOS)
216 settings.per_tile_painting_enabled = true; 218 settings.per_tile_painting_enabled = true;
217 #endif 219 #endif
218 220
219 // These flags should be mirrored by renderer versions in content/renderer/. 221 // These flags should be mirrored by renderer versions in content/renderer/.
220 settings.initial_debug_state.show_debug_borders = 222 settings.initial_debug_state.show_debug_borders =
221 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 223 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
222 settings.initial_debug_state.show_fps_counter = 224 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 557 // CompositorObservers to be notified before starting another
556 // draw cycle. 558 // draw cycle.
557 ScheduleDraw(); 559 ScheduleDraw();
558 } 560 }
559 FOR_EACH_OBSERVER(CompositorObserver, 561 FOR_EACH_OBSERVER(CompositorObserver,
560 observer_list_, 562 observer_list_,
561 OnCompositingEnded(this)); 563 OnCompositingEnded(this));
562 } 564 }
563 565
564 } // namespace ui 566 } // namespace ui
OLDNEW
« no previous file with comments | « 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