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 compositor_ = NULL; | 75 compositor_ = NULL; |
76 } | 76 } |
77 | 77 |
78 Compositor::Compositor(ui::ContextFactory* context_factory, | 78 Compositor::Compositor(ui::ContextFactory* context_factory, |
79 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 79 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
80 : context_factory_(context_factory), | 80 : context_factory_(context_factory), |
81 root_layer_(NULL), | 81 root_layer_(NULL), |
82 widget_(gfx::kNullAcceleratedWidget), | 82 widget_(gfx::kNullAcceleratedWidget), |
83 widget_valid_(false), | 83 widget_valid_(false), |
84 output_surface_requested_(false), | 84 output_surface_requested_(false), |
85 surface_id_allocator_(context_factory->CreateSurfaceIdAllocator()), | 85 surface_id_allocator_(new cc::SurfaceIdAllocator( |
| 86 context_factory->AllocateSurfaceClientId())), |
86 task_runner_(task_runner), | 87 task_runner_(task_runner), |
87 vsync_manager_(new CompositorVSyncManager()), | 88 vsync_manager_(new CompositorVSyncManager()), |
88 device_scale_factor_(0.0f), | 89 device_scale_factor_(0.0f), |
89 locks_will_time_out_(true), | 90 locks_will_time_out_(true), |
90 compositor_lock_(NULL), | 91 compositor_lock_(NULL), |
91 layer_animator_collection_(this), | 92 layer_animator_collection_(this), |
92 weak_ptr_factory_(this) { | 93 weak_ptr_factory_(this) { |
93 root_web_layer_ = cc::Layer::Create(); | 94 root_web_layer_ = cc::Layer::Create(); |
94 | 95 |
95 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 96 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 observer_list_, | 501 observer_list_, |
501 OnCompositingLockStateChanged(this)); | 502 OnCompositingLockStateChanged(this)); |
502 } | 503 } |
503 | 504 |
504 void Compositor::CancelCompositorLock() { | 505 void Compositor::CancelCompositorLock() { |
505 if (compositor_lock_) | 506 if (compositor_lock_) |
506 compositor_lock_->CancelLock(); | 507 compositor_lock_->CancelLock(); |
507 } | 508 } |
508 | 509 |
509 } // namespace ui | 510 } // namespace ui |
OLD | NEW |