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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 75 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
76 : context_factory_(context_factory), | 76 : context_factory_(context_factory), |
77 root_layer_(NULL), | 77 root_layer_(NULL), |
78 widget_(gfx::kNullAcceleratedWidget), | 78 widget_(gfx::kNullAcceleratedWidget), |
79 #if defined(USE_AURA) | 79 #if defined(USE_AURA) |
80 window_(nullptr), | 80 window_(nullptr), |
81 #endif | 81 #endif |
82 widget_valid_(false), | 82 widget_valid_(false), |
83 compositor_frame_sink_requested_(false), | 83 compositor_frame_sink_requested_(false), |
84 frame_sink_id_(context_factory->AllocateFrameSinkId()), | 84 frame_sink_id_(context_factory->AllocateFrameSinkId()), |
85 surface_id_allocator_( | |
86 base::MakeUnique<cc::SurfaceIdAllocator>(frame_sink_id_)), | |
87 task_runner_(task_runner), | 85 task_runner_(task_runner), |
88 vsync_manager_(new CompositorVSyncManager()), | 86 vsync_manager_(new CompositorVSyncManager()), |
89 device_scale_factor_(0.0f), | 87 device_scale_factor_(0.0f), |
90 locks_will_time_out_(true), | 88 locks_will_time_out_(true), |
91 compositor_lock_(NULL), | 89 compositor_lock_(NULL), |
92 layer_animator_collection_(this), | 90 layer_animator_collection_(this), |
93 weak_ptr_factory_(this) { | 91 weak_ptr_factory_(this) { |
94 context_factory->GetSurfaceManager()->RegisterFrameSinkId(frame_sink_id_); | 92 context_factory->GetSurfaceManager()->RegisterFrameSinkId(frame_sink_id_); |
95 root_web_layer_ = cc::Layer::Create(); | 93 root_web_layer_ = cc::Layer::Create(); |
96 | 94 |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 observer_list_, | 544 observer_list_, |
547 OnCompositingLockStateChanged(this)); | 545 OnCompositingLockStateChanged(this)); |
548 } | 546 } |
549 | 547 |
550 void Compositor::CancelCompositorLock() { | 548 void Compositor::CancelCompositorLock() { |
551 if (compositor_lock_) | 549 if (compositor_lock_) |
552 compositor_lock_->CancelLock(); | 550 compositor_lock_->CancelLock(); |
553 } | 551 } |
554 | 552 |
555 } // namespace ui | 553 } // namespace ui |
OLD | NEW |