Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 // Call this function when you expect there to be a swap buffer. | 297 // Call this function when you expect there to be a swap buffer. |
| 298 // See swap_promise.h for how to use SwapPromise. | 298 // See swap_promise.h for how to use SwapPromise. |
| 299 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 299 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
| 300 | 300 |
| 301 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 301 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
| 302 | 302 |
| 303 protected: | 303 protected: |
| 304 LayerTreeHost(LayerTreeHostClient* client, | 304 LayerTreeHost(LayerTreeHostClient* client, |
| 305 SharedBitmapManager* manager, | 305 SharedBitmapManager* manager, |
| 306 const LayerTreeSettings& settings); | 306 const LayerTreeSettings& settings); |
| 307 void InitializeThreaded( | 307 virtual void InitializeThreaded( |
|
brianderson
2014/05/14 21:12:07
Instead of overriding this method, could we re-use
simonhong
2014/05/15 01:32:07
Done.
| |
| 308 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 308 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
| 309 void InitializeSingleThreaded( | 309 void InitializeSingleThreaded( |
| 310 LayerTreeHostSingleThreadClient* single_thread_client); | 310 LayerTreeHostSingleThreadClient* single_thread_client); |
| 311 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 311 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
| 312 void SetOutputSurfaceLostForTesting(bool is_lost) { | 312 void SetOutputSurfaceLostForTesting(bool is_lost) { |
| 313 output_surface_lost_ = is_lost; | 313 output_surface_lost_ = is_lost; |
| 314 } | 314 } |
| 315 void InitializeProxy(scoped_ptr<Proxy> proxy); | |
|
brianderson
2014/05/14 21:12:07
This could stay private. There's an existing Layer
simonhong
2014/05/15 01:32:07
Ah, I didn't find it.
Thanks. Restored.
| |
| 315 | 316 |
| 316 MicroBenchmarkController micro_benchmark_controller_; | 317 MicroBenchmarkController micro_benchmark_controller_; |
| 317 | 318 |
| 318 private: | 319 private: |
| 319 void InitializeProxy(scoped_ptr<Proxy> proxy); | |
| 320 | |
| 321 void PaintLayerContents( | 320 void PaintLayerContents( |
| 322 const RenderSurfaceLayerList& render_surface_layer_list, | 321 const RenderSurfaceLayerList& render_surface_layer_list, |
| 323 ResourceUpdateQueue* queue, | 322 ResourceUpdateQueue* queue, |
| 324 bool* did_paint_content, | 323 bool* did_paint_content, |
| 325 bool* need_more_updates); | 324 bool* need_more_updates); |
| 326 void PaintMasksForRenderSurface(Layer* render_surface_layer, | 325 void PaintMasksForRenderSurface(Layer* render_surface_layer, |
| 327 ResourceUpdateQueue* queue, | 326 ResourceUpdateQueue* queue, |
| 328 bool* did_paint_content, | 327 bool* did_paint_content, |
| 329 bool* need_more_updates); | 328 bool* need_more_updates); |
| 330 bool UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue); | 329 bool UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 449 | 448 |
| 450 ScopedPtrVector<SwapPromise> swap_promise_list_; | 449 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 451 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 450 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 452 | 451 |
| 453 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 452 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 454 }; | 453 }; |
| 455 | 454 |
| 456 } // namespace cc | 455 } // namespace cc |
| 457 | 456 |
| 458 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 457 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |