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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 layer_animator_collection_(this), | 87 layer_animator_collection_(this), |
88 weak_ptr_factory_(this) { | 88 weak_ptr_factory_(this) { |
89 root_web_layer_ = cc::Layer::Create(); | 89 root_web_layer_ = cc::Layer::Create(); |
90 | 90 |
91 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 91 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
92 | 92 |
93 cc::LayerTreeSettings settings; | 93 cc::LayerTreeSettings settings; |
94 // When impl-side painting is enabled, this will ensure PictureLayers always | 94 // When impl-side painting is enabled, this will ensure PictureLayers always |
95 // can have LCD text, to match the previous behaviour with ContentLayers, | 95 // can have LCD text, to match the previous behaviour with ContentLayers, |
96 // where LCD-not-allowed notifications were ignored. | 96 // where LCD-not-allowed notifications were ignored. |
97 settings.layers_always_allowed_lcd_text = true; | 97 settings.layers_always_allowed_lcd_text = true; |
98 settings.renderer_settings.refresh_rate = | 98 settings.renderer_settings.refresh_rate = |
99 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate | 99 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate |
100 : kDefaultRefreshRate; | 100 : kDefaultRefreshRate; |
101 settings.main_frame_before_activation_enabled = false; | 101 settings.main_frame_before_activation_enabled = false; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 // Call ScheduleDraw() instead of Draw() in order to allow other | 483 // Call ScheduleDraw() instead of Draw() in order to allow other |
484 // CompositorObservers to be notified before starting another | 484 // CompositorObservers to be notified before starting another |
485 // draw cycle. | 485 // draw cycle. |
486 ScheduleDraw(); | 486 ScheduleDraw(); |
487 } | 487 } |
488 FOR_EACH_OBSERVER( | 488 FOR_EACH_OBSERVER( |
489 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 489 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
490 } | 490 } |
491 | 491 |
492 } // namespace ui | 492 } // namespace ui |
OLD | NEW |