| 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/common/compositor/blimp_image_serialization_processor.h" | 10 #include "blimp/common/compositor/blimp_image_serialization_processor.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // client. Since it currently overrides all settings, ignore them. | 132 // client. Since it currently overrides all settings, ignore them. |
| 133 // See crbug/577985. | 133 // See crbug/577985. |
| 134 GenerateLayerTreeSettings(settings_.get()); | 134 GenerateLayerTreeSettings(settings_.get()); |
| 135 settings_ | 135 settings_ |
| 136 ->abort_commit_before_output_surface_creation = false; | 136 ->abort_commit_before_output_surface_creation = false; |
| 137 } | 137 } |
| 138 | 138 |
| 139 return settings_.get(); | 139 return settings_.get(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void BlimpCompositorManager::DidCompleteSwapBuffers() {} |
| 143 |
| 142 scoped_refptr<base::SingleThreadTaskRunner> | 144 scoped_refptr<base::SingleThreadTaskRunner> |
| 143 BlimpCompositorManager::GetCompositorTaskRunner() { | 145 BlimpCompositorManager::GetCompositorTaskRunner() { |
| 144 if (compositor_thread_) | 146 if (compositor_thread_) |
| 145 return compositor_thread_->task_runner(); | 147 return compositor_thread_->task_runner(); |
| 146 | 148 |
| 147 base::Thread::Options thread_options; | 149 base::Thread::Options thread_options; |
| 148 #if defined(OS_ANDROID) | 150 #if defined(OS_ANDROID) |
| 149 thread_options.priority = base::ThreadPriority::DISPLAY; | 151 thread_options.priority = base::ThreadPriority::DISPLAY; |
| 150 #endif | 152 #endif |
| 151 compositor_thread_.reset(new base::Thread("Compositor")); | 153 compositor_thread_.reset(new base::Thread("Compositor")); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 196 |
| 195 BlimpCompositor* BlimpCompositorManager::GetCompositor(int render_widget_id) { | 197 BlimpCompositor* BlimpCompositorManager::GetCompositor(int render_widget_id) { |
| 196 CompositorMap::const_iterator it = compositors_.find(render_widget_id); | 198 CompositorMap::const_iterator it = compositors_.find(render_widget_id); |
| 197 if (it == compositors_.end()) | 199 if (it == compositors_.end()) |
| 198 return nullptr; | 200 return nullptr; |
| 199 return it->second.get(); | 201 return it->second.get(); |
| 200 } | 202 } |
| 201 | 203 |
| 202 } // namespace client | 204 } // namespace client |
| 203 } // namespace blimp | 205 } // namespace blimp |
| OLD | NEW |