| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 last_started_frame_(0), | 79 last_started_frame_(0), |
| 80 last_ended_frame_(0), | 80 last_ended_frame_(0), |
| 81 disable_schedule_composite_(false), | 81 disable_schedule_composite_(false), |
| 82 compositor_lock_(NULL), | 82 compositor_lock_(NULL), |
| 83 defer_draw_scheduling_(false), | 83 defer_draw_scheduling_(false), |
| 84 waiting_on_compositing_end_(false), | 84 waiting_on_compositing_end_(false), |
| 85 draw_on_compositing_end_(false), | 85 draw_on_compositing_end_(false), |
| 86 swap_state_(SWAP_NONE), | 86 swap_state_(SWAP_NONE), |
| 87 schedule_draw_factory_(this) { | 87 schedule_draw_factory_(this) { |
| 88 root_web_layer_ = cc::Layer::Create(); | 88 root_web_layer_ = cc::Layer::Create(); |
| 89 root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f)); | |
| 90 | 89 |
| 91 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 90 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 92 | 91 |
| 93 cc::LayerTreeSettings settings; | 92 cc::LayerTreeSettings settings; |
| 94 settings.refresh_rate = | 93 settings.refresh_rate = |
| 95 context_factory_->DoesCreateTestContexts() | 94 context_factory_->DoesCreateTestContexts() |
| 96 ? kTestRefreshRate | 95 ? kTestRefreshRate |
| 97 : kDefaultRefreshRate; | 96 : kDefaultRefreshRate; |
| 98 settings.main_frame_before_draw_enabled = false; | 97 settings.main_frame_before_draw_enabled = false; |
| 99 settings.main_frame_before_activation_enabled = false; | 98 settings.main_frame_before_activation_enabled = false; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // CompositorObservers to be notified before starting another | 389 // CompositorObservers to be notified before starting another |
| 391 // draw cycle. | 390 // draw cycle. |
| 392 ScheduleDraw(); | 391 ScheduleDraw(); |
| 393 } | 392 } |
| 394 FOR_EACH_OBSERVER(CompositorObserver, | 393 FOR_EACH_OBSERVER(CompositorObserver, |
| 395 observer_list_, | 394 observer_list_, |
| 396 OnCompositingEnded(this)); | 395 OnCompositingEnded(this)); |
| 397 } | 396 } |
| 398 | 397 |
| 399 } // namespace ui | 398 } // namespace ui |
| OLD | NEW |