Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 context_factory_private_(context_factory_private), | 78 context_factory_private_(context_factory_private), |
| 79 root_layer_(NULL), | 79 root_layer_(NULL), |
| 80 widget_(gfx::kNullAcceleratedWidget), | 80 widget_(gfx::kNullAcceleratedWidget), |
| 81 #if defined(USE_AURA) | 81 #if defined(USE_AURA) |
| 82 window_(nullptr), | 82 window_(nullptr), |
| 83 #endif | 83 #endif |
| 84 widget_valid_(false), | 84 widget_valid_(false), |
| 85 compositor_frame_sink_requested_(false), | 85 compositor_frame_sink_requested_(false), |
| 86 frame_sink_id_(context_factory_private | 86 frame_sink_id_(context_factory_private |
| 87 ? context_factory_private->AllocateFrameSinkId() | 87 ? context_factory_private->AllocateFrameSinkId() |
| 88 : cc::FrameSinkId()), | 88 : cc::FrameSinkId(1, 1)), |
|
sadrul
2016/12/16 02:29:09
Let's have a kDefaultFrameSinkId for this. So some
mfomitchev
2016/12/16 18:17:58
Done.
| |
| 89 task_runner_(task_runner), | 89 task_runner_(task_runner), |
| 90 vsync_manager_(new CompositorVSyncManager()), | 90 vsync_manager_(new CompositorVSyncManager()), |
| 91 device_scale_factor_(0.0f), | 91 device_scale_factor_(0.0f), |
| 92 locks_will_time_out_(true), | 92 locks_will_time_out_(true), |
| 93 compositor_lock_(NULL), | 93 compositor_lock_(NULL), |
| 94 layer_animator_collection_(this), | 94 layer_animator_collection_(this), |
| 95 weak_ptr_factory_(this) { | 95 weak_ptr_factory_(this) { |
| 96 if (context_factory_private) { | 96 if (context_factory_private) { |
| 97 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId( | 97 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId( |
| 98 frame_sink_id_); | 98 frame_sink_id_); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 558 for (auto& observer : observer_list_) | 558 for (auto& observer : observer_list_) |
| 559 observer.OnCompositingLockStateChanged(this); | 559 observer.OnCompositingLockStateChanged(this); |
| 560 } | 560 } |
| 561 | 561 |
| 562 void Compositor::CancelCompositorLock() { | 562 void Compositor::CancelCompositorLock() { |
| 563 if (compositor_lock_) | 563 if (compositor_lock_) |
| 564 compositor_lock_->CancelLock(); | 564 compositor_lock_->CancelLock(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace ui | 567 } // namespace ui |
| OLD | NEW |