OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/client/feature/compositor/blimp_compositor_manager.h" | 5 #include "blimp/client/feature/compositor/blimp_compositor_manager.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "blimp/client/feature/compositor/blimp_layer_tree_settings.h" | 9 #include "blimp/client/feature/compositor/blimp_layer_tree_settings.h" |
10 #include "blimp/client/feature/compositor/client_image_serialization_processor.h
" | 10 #include "blimp/client/feature/compositor/client_image_serialization_processor.h
" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 | 138 |
139 return settings_.get(); | 139 return settings_.get(); |
140 } | 140 } |
141 | 141 |
142 void BlimpCompositorManager::DidCompleteSwapBuffers() { | 142 void BlimpCompositorManager::DidCompleteSwapBuffers() { |
143 DCHECK(client_); | 143 DCHECK(client_); |
144 client_->OnSwapBuffersCompleted(); | 144 client_->OnSwapBuffersCompleted(); |
145 } | 145 } |
146 | 146 |
| 147 void BlimpCompositorManager::DidCommitAndDrawFrame() { |
| 148 DCHECK(client_); |
| 149 client_->DidCommitAndDrawFrame(); |
| 150 } |
| 151 |
147 scoped_refptr<base::SingleThreadTaskRunner> | 152 scoped_refptr<base::SingleThreadTaskRunner> |
148 BlimpCompositorManager::GetCompositorTaskRunner() { | 153 BlimpCompositorManager::GetCompositorTaskRunner() { |
149 if (compositor_thread_) | 154 if (compositor_thread_) |
150 return compositor_thread_->task_runner(); | 155 return compositor_thread_->task_runner(); |
151 | 156 |
152 base::Thread::Options thread_options; | 157 base::Thread::Options thread_options; |
153 #if defined(OS_ANDROID) | 158 #if defined(OS_ANDROID) |
154 thread_options.priority = base::ThreadPriority::DISPLAY; | 159 thread_options.priority = base::ThreadPriority::DISPLAY; |
155 #endif | 160 #endif |
156 compositor_thread_.reset(new base::Thread("Compositor")); | 161 compositor_thread_.reset(new base::Thread("Compositor")); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 204 |
200 BlimpCompositor* BlimpCompositorManager::GetCompositor(int render_widget_id) { | 205 BlimpCompositor* BlimpCompositorManager::GetCompositor(int render_widget_id) { |
201 CompositorMap::const_iterator it = compositors_.find(render_widget_id); | 206 CompositorMap::const_iterator it = compositors_.find(render_widget_id); |
202 if (it == compositors_.end()) | 207 if (it == compositors_.end()) |
203 return nullptr; | 208 return nullptr; |
204 return it->second.get(); | 209 return it->second.get(); |
205 } | 210 } |
206 | 211 |
207 } // namespace client | 212 } // namespace client |
208 } // namespace blimp | 213 } // namespace blimp |
OLD | NEW |